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<-
Per Kurt Hornik
When calling pos on a single sentence:
so I guess sapply is dropping all dimensions?