[R] run r script in r-fiddle

Suzen, Mehmet msuzen at gmail.com
Mon Oct 30 11:16:30 CET 2017


Hi Frank,

You could upload your R source file to a public URL, for example to
github and read via RCurl,
as source do not support https as far as I know. Here is a working example.

library('RCurl')
tmatrix <- getURL("https://raw.githubusercontent.com/msuzen/isingLenzMC/master/R/isingUtils.R")
eval(parse(text=tmatrix))

Not that you need to use raw URL for github file.

Best,
-m





On 30 October 2017 at 01:56, Frank Mei <frank.ye.mei at gmail.com> wrote:
> Hi All,
>
> I want to know how to run an R file on my computer in R-Fiddle?
>
> I tried source("filename.r"), but not working.
>
> thanks,
> Frank
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list