{"action":"opened","issue":{"url":"https://api.github.com/repos/kbenoit/quanteda/issues/37","labels_url":"https://api.github.com/repos/kbenoit/quanteda/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/kbenoit/quanteda/issues/37/comments","events_url":"https://api.github.com/repos/kbenoit/quanteda/issues/37/events","html_url":"https://github.com/kbenoit/quanteda/issues/37","id":72414338,"number":37,"title":"Error getting a directory of texts in to quanteda corpus","user":{"login":"adamramey","id":12151706,"avatar_url":"https://avatars.githubusercontent.com/u/12151706?v=3","gravatar_id":"","url":"https://api.github.com/users/adamramey","html_url":"https://github.com/adamramey","followers_url":"https://api.github.com/users/adamramey/followers","following_url":"https://api.github.com/users/adamramey/following{/other_user}","gists_url":"https://api.github.com/users/adamramey/gists{/gist_id}","starred_url":"https://api.github.com/users/adamramey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamramey/subscriptions","organizations_url":"https://api.github.com/users/adamramey/orgs","repos_url":"https://api.github.com/users/adamramey/repos","events_url":"https://api.github.com/users/adamramey/events{/privacy}","received_events_url":"https://api.github.com/users/adamramey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-05-01T11:38:07Z","updated_at":"2015-05-01T11:38:07Z","closed_at":null,"body":"I've tried to get a directory of texts in to a quanteda corpus with some issues. First, I make a VCorpus using the DirSource function in tm. Second, I try to make the object a quanteda corpus. However, I get the error \"no applicable method for 'corpus' applied to an object of class \"list.\"\" But it's not a list; I've checked the files and everything seems sound.\r\n\r\n> library(quanteda)\r\n> library(tm)\r\nLoading required package: NLP\r\n\r\nAttaching package: ‘tm’\r\n\r\nThe following objects are masked from ‘package:quanteda’:\r\n\r\n    as.DocumentTermMatrix, stopwords\r\n\r\n> \r\n> \r\n> ds <- VCorpus(DirSource(\"~/Desktop/Speeches/House/2000/\"))\r\n> ##make it a quanteda object\r\n> txts <- corpus(ds)\r\nError in UseMethod(\"corpus\") : \r\n  no applicable method for 'corpus' applied to an object of class \"list\"\r\n> class(ds)\r\n[1] \"VCorpus\" \"Corpus\" \r\n> "}}