Sourcing R script over HTTPS

前端 未结 6 1670
盖世英雄少女心
盖世英雄少女心 2020-11-30 05:52

Is there some way to source an R script from the web?

e.g. source(\'http://github.com/project/R/file.r\')

Reason: I currently have a project tha

6条回答
  •  星月不相逢
    2020-11-30 06:16

    This is working for me on windows:

    library(RCurl)
    # load functions and scripts from github ----------------------------
    fn1 <- getURL("https://raw.githubusercontent.com/SanjitNarwekar/Advanced-R-Programming/master/fn_factorial_loop.R", ssl.verifypeer = FALSE)
    eval(parse(text = fn1))
    

提交回复
热议问题