{"action":"closed","issue":{"url":"https://api.github.com/repos/spatstat/spatstat/issues/53","repository_url":"https://api.github.com/repos/spatstat/spatstat","labels_url":"https://api.github.com/repos/spatstat/spatstat/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/spatstat/spatstat/issues/53/comments","events_url":"https://api.github.com/repos/spatstat/spatstat/issues/53/events","html_url":"https://github.com/spatstat/spatstat/issues/53","id":234185842,"number":53,"title":"wrong description in nndist.Rd?","user":{"login":"dakni","id":17738222,"avatar_url":"https://avatars0.githubusercontent.com/u/17738222?v=3","gravatar_id":"","url":"https://api.github.com/users/dakni","html_url":"https://github.com/dakni","followers_url":"https://api.github.com/users/dakni/followers","following_url":"https://api.github.com/users/dakni/following{/other_user}","gists_url":"https://api.github.com/users/dakni/gists{/gist_id}","starred_url":"https://api.github.com/users/dakni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dakni/subscriptions","organizations_url":"https://api.github.com/users/dakni/orgs","repos_url":"https://api.github.com/users/dakni/repos","events_url":"https://api.github.com/users/dakni/events{/privacy}","received_events_url":"https://api.github.com/users/dakni/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-07T12:02:52Z","updated_at":"2017-06-07T13:58:16Z","closed_at":"2017-06-07T13:58:16Z","body":"Dear developers, \r\n\r\nthe example\r\n\r\n```\r\ndata(ants)\r\naggregate(nnda, by=list(from=marks(ants)), mean)\r\n```\r\n\r\nresults in:\r\n\r\n```\r\n         from Cataglyphis   Messor\r\n1 Cataglyphis    67.47011 36.27306\r\n2      Messor    59.02549 46.12532\r\n```\r\n\r\nand is described as:\r\n\r\n```\r\n# The mean distance from a Messor nest to\r\n# the nearest other Messor nest is 59.02549 units\r\n```\r\n\r\nAt least in my understanding, this seems to be incorrect, and is supported when calculating \"by hand\":\r\n\r\n```\r\nlapply(split(ants), function(x) mean(nndist(x)))\r\n```\r\n\r\n```\r\n$Cataglyphis\r\n[1] 67.47011\r\n\r\n$Messor\r\n[1] 46.12532\r\n```\r\n\r\nHence, the correct description would be\r\n\r\n```\r\n# The mean distance from a Messor nest to\r\n# the nearest other Messor nest is 46.12532 units\r\n```\r\n\r\nor\r\n\r\n```\r\n# The mean distance from a Messor nest to\r\n# the nearest Cataglyphis nest is 59.02549 units\r\n```"}}
{"actor":{"display_login":"baddstats"}}