Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single sentence bug in pos #150

Closed
trinker opened this issue Jan 28, 2014 · 0 comments
Closed

Single sentence bug in pos #150

trinker opened this issue Jan 28, 2014 · 0 comments

Comments

@trinker
Copy link
Owner

trinker commented Jan 28, 2014

Per Kurt Hornik

When calling pos on a single sentence:

R> qdap::pos("This is a sentence.")
  |======================================================================| 100%
Error in `colnames<-`(`*tmp*`, value = "prop") :
  attempt to set 'colnames' on an object with less than two dimensions
Calls: <Anonymous> -> colnames<-

From a quick look:

Browse[2]>
debug: G5 <- sapply(data.frame(G4, check.names = FALSE), function(x) cons *
    (x/m2$word.count))
Browse[2]>
debug: colnames(G5) <- paste0("prop", colnames(G5))
Browse[2]>
Error in `colnames<-`(`*tmp*`, value = "prop") :
  attempt to set 'colnames' on an object with less than two dimensions
Calls: <Anonymous> -> colnames<-

so I guess sapply is dropping all dimensions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant