This is a great video on a pretty confusing (and ever-changing) topic. I would like to add that I personally use readxl::read_excel to bring files in because I like tibbles, and openxlsx::write.xlsx to write them out. The 'xlsx' package requires Java and has been a pain to deal with across different computers, whereas the other two packages don't. Also, 'readxl' has xls and xlsx specific functions in the read_*, but read_excel automatically checks the file extension.
Thank you very much for the kind feedback Douglas, glad you like the video! :) Also, thanks a lot for sharing your thoughts on the different packages. Personally, I prefer to work with data frames, this is definitely a matter of taste, though. Regards, Joachim
Hey Haraldur, the xlsx package can sometimes lead to problems due to JAVA (have a look here: statisticsglobe.com/r-error-java-home-cannot-be-determined-from-the-registry). Once this is fixed, it should work fine. However, the other packages are definitely good alternatives as well!
I agree, working with CSVs is definitely the preferable choice. Due to non-R-related reasons, you sometimes may have to work with xlsx files, though. So I think it's good to have this in your repertoire.
Hello Jose, If you encounter some potential Java-related issues, I advise you to use the functions read.xlsx and write.xlsx of the openxlsx package. Best, Cansu
This is a great video on a pretty confusing (and ever-changing) topic.
I would like to add that I personally use readxl::read_excel to bring files in because I like tibbles, and openxlsx::write.xlsx to write them out. The 'xlsx' package requires Java and has been a pain to deal with across different computers, whereas the other two packages don't. Also, 'readxl' has xls and xlsx specific functions in the read_*, but read_excel automatically checks the file extension.
Thank you very much for the kind feedback Douglas, glad you like the video! :) Also, thanks a lot for sharing your thoughts on the different packages. Personally, I prefer to work with data frames, this is definitely a matter of taste, though. Regards, Joachim
I agree with previous message. I get a ton of error messages with write.xlsx (and actually just trying to load in the library itself).
Hey Haraldur, the xlsx package can sometimes lead to problems due to JAVA (have a look here: statisticsglobe.com/r-error-java-home-cannot-be-determined-from-the-registry). Once this is fixed, it should work fine. However, the other packages are definitely good alternatives as well!
Thanks. 👌
You are very welcome Samir, glad you like it! :)
Also when I am reading in Excel files I simply save them as csv and then read them into R. Gives me fewer head aches.
I agree, working with CSVs is definitely the preferable choice. Due to non-R-related reasons, you sometimes may have to work with xlsx files, though. So I think it's good to have this in your repertoire.
Yes, but what happens with read.xlsx2() and write.xlsx2()? Do you have any examples? in specific of Java problem
Hello Jose,
If you encounter some potential Java-related issues, I advise you to use the functions read.xlsx and write.xlsx of the openxlsx package.
Best,
Cansu