I’m trying to extract some functions stored on dropbox (in a folder).
It all goes well until I try to untar the file. Here’s an example:
library("R.utils")
temp <- tempfile()
temp<-paste(temp,".gz",sep="")
download.file("http://www.dropbox.com/sh/dzgrfdd18dljpj5/OyoTBMj8-v?dl=1",temp)
untar(temp,compressed="gzip",exdir=dirname(temp))
Here I get an error:
Error in rawToChar(block[seq_len(ns)]) :
embedded nul in string: 'PK\003\004\024\0\b\b\b....
Ideally I would then load all the functions in folder like this:
sourceDirectory(dirname(temp))
…but I need to be able to untar them first. I can open the archive in Windows but in R I get the error above. Can anyone help? I’ve tried to use unzip but this only works with smaller folders downloaded from dropbox (such as the one above), bigger ones only work as gzip format (at least in my experience).
1 Answer