Permalink
Browse files

Update count.r

Changed test from `is.vector` to `is.atomic`, in order to fix Issue 130.
  • Loading branch information...
1 parent 9543c05 commit 7f0dfd64e0157f5751967de0f9a73425b65dcf6d @richierocks richierocks committed Jul 15, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 R/count.r
View
@@ -36,7 +36,7 @@
#' count(count(baseball[1:100,], c("id", "year")), "id", "freq")
#' count(count(baseball, c("id", "year")), "freq")
count <- function(df, vars = NULL, wt_var = NULL) {
- if (is.vector(df)) {
+ if (is.atomic(df)) {
df <- data.frame(x = df)
}

0 comments on commit 7f0dfd6

Please sign in to comment.