Reputation: 2666
I have been using the googlesheets package to download sheets from googlesheets and modify them. I then want to update the sheets and push them back to the web. I can do this fine from my local computer using the following code:
library('googlesheets')
#path to remote spreadsheet.
test.url <- 'google.sheet.url'
#remote sheet name
remote_sheet_name <- 'name of remote sheet on google'
google_data_url <- gs_url(test.url)
#download a sheet to a path
gs_download.path <- "/Users/colin/data.csv"
gs_update.path <- "/Users/colin/data_update.csv"
gs_download(google_data_url, ws = NULL, to = gs_download.path, overwrite = T, verbose = TRUE)
#load data as an object.
test <- read.csv(gs_download.path, header = T)
#add a new line of data. really any modification.
new.data <- t(c('Fagus grandifolia',0.77))
new.data <- data.frame(new.data)
colnames(new.data) <- colnames(test)
update <- rbind(test,new.data)
#see if we can send update to the remote sheet.
write.csv(update,gs_update.path)
gs_upload(gs_update.path, sheet_title = remote_sheet_name, verbose = TRUE, overwrite = T)
When I run this final line with the gs_upload
command I get the following error:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/colin/R/library/openssl/libs/openssl.so':
libssl.so.10: cannot open shared object file: No such file or directory
I'm not really sure what this means and googling has gotten me nowhere. Again, all of this works fine on my local machine, but fails on my remote machine.
Upvotes: 0
Views: 104
Reputation: 6729
I come across github and found the cause of your error, which I think the one you need to check.
"
: cannot open
" comes from two types of errors: First, a file/connection can't be opened because R can't find it (likely because of an error in the path), and second, failures in.onLoad()
because a package can't find a system dependency.
Upvotes: 1