-
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
length of NULL cannot be changed errors on installing R 3.5.0 #833
Comments
This seems to be similar to #750, if you can reproduce it with a small example dataset I will try and fix it. |
This comment has been minimized.
This comment has been minimized.
I have just reviewed Issue 750 - agree it sounds the same issue. Interesting thing from that report was that the same code worked for some and not for others so it may be something environmental. Could it be a platform / compiler issue? I’m using a Mac with High Sierra. I know there are some compiler warnings when installing - wonder if they shed any light on things. Or a version dependency issue? Any dependencies to consider that may influence things? |
Right - I have been trying to narrow this down. Can't make it a reprex just yet, but I think it has something to do with code handling col_skip(). I firstly reduced my defined cols list which significantly reduced the number of errors to 15 warnings. Within that were 15 warnings. col_skip() was present 5 times. It appears that each occurrence of col_skip has been causing the warning 3 times. Furthermore, using cols_only with my subset of definitions generates >50 warnings again - suggesting that by behaving as 'col_skip' for all the other columns has generated the additional warnings. Does that help narrow it down at all? |
This comment has been minimized.
This comment has been minimized.
Hi, I have tested this down to a bare minimum. I created the following as a CSV file:
I then read the file in with:
On my MacBook Pro running R 3.5.0 and the packages as described above I see:
On my iMac running R 3.4 (I would need to check the package versions on the iMac again) this runs flawlessly. The trigger is definitely from defining the column using col_skip(). The following work fine:
Does this help narrow it down? |
Just in case it helps - I had downloaded readr from the GitHub site using devtools::install_github. It's compiling on the mac, my clang version is:
|
Tried this morning to see if I can narrow any setup differences between the iMac and the MacBook Pro. I've ensured that they are running the same versions of tibble, rlang, readr from GitHub and same version of clang - same results (MacBook Pro shows warnings, iMac does not on the same code). So the only logical difference between machines is the version of R. |
Thanks for the reprex, fixed by 47ea858 |
This great - thank you! |
Do you think this fixes issue 750 as well? I think they may be different based on the above. |
Tested with the code that caused this problem initially and can confirm this fixes it. |
I am using read_csv with a subset of columns (cols_only) in R 3.5.1 with everything on the latest version and I am getting the same warning message. |
I have exactly the same issue as @jciconsult. Should we open a new issue for this? |
@thanosgatos, have you updated to the latest development version? (i.e. suppressPackageStartupMessages(library(tidyverse))
mydat <- data_frame(one = c("Bob", "Mary", "Sue"),
two = c(1, 2, 3))
mydat
#> # A tibble: 3 x 2
#> one two
#> <chr> <dbl>
#> 1 Bob 1
#> 2 Mary 2
#> 3 Sue 3
mycsv <- tempfile(fileext = ".csv")
write_csv(mydat, mycsv)
readat <- read_csv(mycsv, col_names = TRUE, cols(one = col_character(),
two = col_skip()))
readat
#> # A tibble: 3 x 1
#> one
#> <chr>
#> 1 Bob
#> 2 Mary
#> 3 Sue
unlink(mycsv) Created on 2018-08-22 by the reprex package (v0.2.0.9000). If you open a new issue, please do so with a small reprex. |
@batpigandme, I've been running the latest CRAN versions. Upgrading to the latest dev version from GitHub did indeed solve the issue. Thank you! |
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Hi,
I'm in the early stages of trying to track this down - asking in case it is 'known' or anyone has any ideas before I spend too long on hunting it down.
I installed R 3.5.0 today and reinstalled packages along with it. I'm using readr 1.2.0, tibble 1.4.2.9001, rlang 0.2.0.9001.
My code sits in a package for loading my dataset. The code is 'known working' on my 3.4.4 machine and has been for some time so it looks like a regression which has occurred somewhere.
I've narrowed it down to calling read_csv which is generating the warnings (>50 warnings).
I'm using defined import columns. Because the column list is large, I'm managing it by splitting it into two definitions (columnTypes and followupColumnTypes), and then calling read_csv:
I'm getting >50 warnings of:
Haven't yet managed to distill the example down further into a reprex - if it doesn't ring any bells with anyone I'll try to do that.
The imported data itself seems fine so whatever is going on isn't affecting the output (but is screwing up my debug as I can't see the wood for the trees! I can workaround by disabling warnings on input - but that is ignoring the issue really!)
The only major R thing I can think of is the byte-compiling by default causing a problem somewhere.
The text was updated successfully, but these errors were encountered: