{"action":"created","issue":{"url":"https://api.github.com/repos/uwescience/myria/issues/732","labels_url":"https://api.github.com/repos/uwescience/myria/issues/732/labels{/name}","comments_url":"https://api.github.com/repos/uwescience/myria/issues/732/comments","events_url":"https://api.github.com/repos/uwescience/myria/issues/732/events","html_url":"https://github.com/uwescience/myria/issues/732","id":67019275,"number":732,"title":"What is the best way to mean-center an attribute?","user":{"login":"BrandonHaynes","id":1433577,"avatar_url":"https://avatars.githubusercontent.com/u/1433577?v=3","gravatar_id":"","url":"https://api.github.com/users/BrandonHaynes","html_url":"https://github.com/BrandonHaynes","followers_url":"https://api.github.com/users/BrandonHaynes/followers","following_url":"https://api.github.com/users/BrandonHaynes/following{/other_user}","gists_url":"https://api.github.com/users/BrandonHaynes/gists{/gist_id}","starred_url":"https://api.github.com/users/BrandonHaynes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrandonHaynes/subscriptions","organizations_url":"https://api.github.com/users/BrandonHaynes/orgs","repos_url":"https://api.github.com/users/BrandonHaynes/repos","events_url":"https://api.github.com/users/BrandonHaynes/events{/privacy}","received_events_url":"https://api.github.com/users/BrandonHaynes/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/uwescience/myria/labels/Question","name":"Question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-04-08T00:22:34Z","updated_at":"2015-04-08T00:42:07Z","closed_at":"2015-04-08T00:42:07Z","body":"I need to mean-center a bunch of tuples in Myria.  MyriaL doesn't support this inline (e.g., \"`[from relation emit x - avg(x)]`\"), and I understand why this isn't valid.  \r\n\r\nSo what is the best way to go about this?  Obviously I can take the cross product:\r\n\r\n```\r\nmean = [from relation emit avg(x) as _avg];\r\ncentered = [from relation, mean emit x - _avg];\r\n```\r\n\r\nIs there an alternate approach that is superior?  Or a way to convert a singleton relation back into a scalar that I am not aware of?"},"comment":{"url":"https://api.github.com/repos/uwescience/myria/issues/comments/90769253","html_url":"https://github.com/uwescience/myria/issues/732#issuecomment-90769253","issue_url":"https://api.github.com/repos/uwescience/myria/issues/732","id":90769253,"user":{"login":"BrandonHaynes","id":1433577,"avatar_url":"https://avatars.githubusercontent.com/u/1433577?v=3","gravatar_id":"","url":"https://api.github.com/users/BrandonHaynes","html_url":"https://github.com/BrandonHaynes","followers_url":"https://api.github.com/users/BrandonHaynes/followers","following_url":"https://api.github.com/users/BrandonHaynes/following{/other_user}","gists_url":"https://api.github.com/users/BrandonHaynes/gists{/gist_id}","starred_url":"https://api.github.com/users/BrandonHaynes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrandonHaynes/subscriptions","organizations_url":"https://api.github.com/users/BrandonHaynes/orgs","repos_url":"https://api.github.com/users/BrandonHaynes/repos","events_url":"https://api.github.com/users/BrandonHaynes/events{/privacy}","received_events_url":"https://api.github.com/users/BrandonHaynes/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T00:42:07Z","updated_at":"2015-04-08T00:42:07Z","body":"Great, I'll see if I can dig up the unboxing syntax."}}