I am a complete newby to R, so bear with me if the answer is obvious. I work on a laptop that is not owned by me and I thus have no admin rights whatsoever besides the original installation that the administrator had done for me. I assume that the lack of admin rights is the reason for me not to be able to write to an excel file. See an example below. The original dataframe is merged from bibliographic databases. Error codes are the same. Writing the original data file as a text file did work, but some rows did not turn out properly once opened in excel. Tried on another computer with xlsx package, everthing worked fine and I had not problems with weird rows. That's what I want.
Name1= c(1,2,3,4,5)
Name2= c("Africa", "Europe", "America", "Asia", "Australia")
data = data.frame(Name1, Name2)
library(openxlsx)
write.xlsx(data, file = "C:/Users/ISSL16002/Desktop/R/Test.xlsx")
Error: zipping up workbook failed. Please make sure Rtools is installed or a zip application is available to R. Try installr::install.rtools() on Windows. If the "Rtools\bin" directory does not appear in Sys.getenv("PATH") please add it to the system PATH or set this within the R session with Sys.setenv("R_ZIPCMD" = "path/to/zip.exe")
library(xlsx)
Loading required package: rJava Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry Error: package ‘rJava’ could not be loaded
library(rJava)
Error: package or namespace load failed for ‘rJava’: .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the Registry
Anyone an idea what I can do, i.e. is there another package possible? I don't care for the formatting functions etc, just need a proper excel file. Please keep in mind that I hardly "speak" R, so I a) hope the explanation was understandable and b) I'll be able to understand answers - so laymen's terms if possible. Many thanks, Ikke