Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Problems with reading xls file on Centos #189
I have noticed a problem when using
An example of this is when running your test test-missing-values.R, and all the tests for the xls files fail on my OS. Using the
structure(c("NA", "8", "8"), class = "AsIs") 1 NA NA 2 1 8 3 1 8
Also for the file empty-named-column.xls, it returns;
structure(c(" 2", "NA", "NA"), class = "AsIs") 1 1 2 2 2 NA 3 3 NA
Similar behaviour is shown for the files utf8-sheets.xls and blanks.xls.
However, for the files dates-1900.xls and dates-1904.xls, the function works correctly, but I believe this is because it has no column names, blank columns or character objects.
> sessionInfo() R version 3.2.5 (2016-04-14) Platform: x86_64-pc-linux-gnu (64-bit) Running under: CentOS release 6.3 (Final) locale:  LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8  LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8  LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C  LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached base packages:  tools stats graphics grDevices utils datasets methods base other attached packages:  validation.readxl_0.1.1 validationTools_0.2.0-166 png_0.1-7  knitr_1.12.3 XML_3.98-1.4 RUnit_0.4.31  roxygen2_5.0.1 devtools_1.10.0 readxl_0.1.1  testthat_0.11.0 loaded via a namespace (and not attached):  Rcpp_0.12.4 digest_0.6.9 crayon_1.3.1 withr_1.0.1 magrittr_1.5 stringi_1.0-1 stringr_1.0.0  memoise_1.0.0
This sounds like an issue I ran into today as well. I was testing a script on my local OS X workstation (OS X 10.10.5) and it was working fine. I started running into issues when I tried testing the same script on a Linux machine (CentOS 6.6). Similar to @KarinaMarks, columns names and character columns aren't included in the data frame returned by
Below is the session info for the Linux machine on which I'm having issues.
I was also hit by this. There are already failing tests, but it must be something specific to CentOS. See:
added a commit
Nov 7, 2016
@jennybc: Just an FYI, I'm running into an issue again with the latest commit on master (6c76a9b) when I try to load in the Excel spreadsheet. I get the output posted below. I can't be sure if it's exactly the same issue. For now, I'm using a past commit (from when I said it was working, i.e. 3338f92). If you need me to narrow down the commit where the issue arose or create a new GitHub issue, let me know.
I posted, unsuccessfully I suppose, that this is different and, as @gergness said, should go in a new issue with a reprex. However I know many things are currently broken for xls (is that what
Unfortunately, I cannot share the spreadsheet without modifying it because it contains sensitive patient metadata. That being said, the issue I mentioned in my previous comment is resolved in the latest commit on master (f95e0ae). Since I do have a commit that works and you are currently actively developing this package, I will hold off until the next release to see if any issues remain. If you want, you can ping me to test the release candidate on my Excel spreadsheet. If that doesn't work, I could then spend time creating a derivative Excel spreadsheet that reproduces the same issue and doesn't contain sensitive information.
Thanks for your work on readxl! It's really appreciated.