-
Notifications
You must be signed in to change notification settings - Fork 285
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
format.col_spec() fails with long expressions. #597
Labels
bug
an unexpected problem or unintended behavior
Comments
You can make such a specification ... but you just can't print it at the moment. x <- readr::cols(a = readr::col_factor(
levels = c("apple", "pear", "banana", "peach", "apricot", "orange", "plum"), ordered = TRUE)
)
print(x)
#> Error in vapply(cols[[i]], deparse, character(1)): values must be length 1,
#> but FUN(X[[1]]) result is length 2 I realize that is still a problem! But it means you can still use |
jimhester
added a commit
that referenced
this issue
Feb 6, 2017
jimhester
changed the title
col_factor fails with cumulative length of labels greater than 32 characters for levels argument.
format.col_spec() fails with long expressions.
Feb 6, 2017
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am defining a column as a factor, as follows.
Which produces the following error:
However, the following two examples do not produce errors:
But with the third example, if I add just one extra character to any of the labels, e.g. 'apri' to 'apric', I get the error again:
After trying a number of combinations, I believe the error occurs once there are more than 32 cumulative characters used to define the labels of the levels:
Below is a copy of the traceback:
I am using the current development version of
readr
available through github and R version 3.3.2 on Windows 10.The text was updated successfully, but these errors were encountered: