使用R从bitbucket private repo下载RData

时间:2015-12-14 14:15:42

标签: r git bitbucket

我正在尝试将.RData从我自己的bitbucket私人仓库导入Rstudio。我尝试使用谷歌搜索,但我似乎得到了关于GitHub的答案。虽然有用,但这些技术并未讨论私人回购。一些帮助会很棒。我尝试了几种方法,但它没有用。

1

x <- read.csv( curl("https://xxx@bitbucket.org/xxx/data-sets.git/DataSets/xxx.csv") )
Error in open.connection(file, "rt") : HTTP error 404.

2

url <- "https://xxxx@bitbucket.org/xxx/data-sets/DataSets/xxx.csv)"
 download.file(url, "myfile")

 trying URL 'https://xxx@bitbucket.org/xxx/data-sets/DataSets/xxx.csv)'
  Content type 'text/html; charset=utf-8' length 32376 bytes (31 KB)
  downloaded 31 KB

load("myfile")

Error: bad restore file magic number (file may be corrupted) -- no data loaded 
In addition: Warning message:
file ‘myfile’ has magic number '<!DOC'
Use of save versions prior to 2 is deprecated 

3

 load(url(url))
 Error: the input does not start with a magic number compatible with loading from a connection

0 个答案:

没有答案