Importing data into R (rdata) from Github

后端 未结 3 1701
后悔当初
后悔当初 2020-12-06 06:32

I want to put some R code plus the associated data file (RData) on Github.

So far, everything works okay. But when people clone the repository, I want them to be

3条回答
  •  感情败类
    2020-12-06 06:51

    load takes a filename.

    x <- RCurl::getURL("https://github.com/thefactmachine/hex-binning-gis-data/raw/master/popDensity.RData")
    writeLines(x, tmp <- tempfile())
    y <- load(tmp)
    

提交回复
热议问题