{"action":"opened","issue":{"url":"https://api.github.com/repos/joey711/phyloseq/issues/483","labels_url":"https://api.github.com/repos/joey711/phyloseq/issues/483/labels{/name}","comments_url":"https://api.github.com/repos/joey711/phyloseq/issues/483/comments","events_url":"https://api.github.com/repos/joey711/phyloseq/issues/483/events","html_url":"https://github.com/joey711/phyloseq/issues/483","id":80450697,"number":483,"title":"subset_samples appears to misbehave if included in functions","user":{"login":"macrobiotus","id":10920135,"avatar_url":"https://avatars.githubusercontent.com/u/10920135?v=3","gravatar_id":"","url":"https://api.github.com/users/macrobiotus","html_url":"https://github.com/macrobiotus","followers_url":"https://api.github.com/users/macrobiotus/followers","following_url":"https://api.github.com/users/macrobiotus/following{/other_user}","gists_url":"https://api.github.com/users/macrobiotus/gists{/gist_id}","starred_url":"https://api.github.com/users/macrobiotus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/macrobiotus/subscriptions","organizations_url":"https://api.github.com/users/macrobiotus/orgs","repos_url":"https://api.github.com/users/macrobiotus/repos","events_url":"https://api.github.com/users/macrobiotus/events{/privacy}","received_events_url":"https://api.github.com/users/macrobiotus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-25T08:37:07Z","updated_at":"2015-05-25T08:37:07Z","closed_at":null,"body":"Hi Paul,\r\n\r\nTwo examples briefly: \r\n````ps_ob.lt <- subset_samples(ps_ob, sample_data(ps_ob)[,which(colnames(sample_data(ps_ob)) == \"Location\")] == \"Lake_Terrasovoje\")````\r\n\r\n````ps_ob.lt <- subset_samples(ps_ob, sample_data(ps_ob)$Location == \"Lake_Terrasovoje\")````\r\n\r\nWorks both fine outside functions, but does not do the right thing when inside a function.\r\n\r\nPerhaps this is because my $Location column in sample(data) are factors, but I will have to invesihate this further. Its giving quite some grief, but perhaps it will all be good soon.\r\n\r\nSorry for being brief.\r\n\r\nCheers,\r\nPaul\r\n\r\n\r\n\r\n"}}