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]]
You can't. Use R on your computer instead. -- Sent from my phone. Please excuse my brevity. On October 29, 2017 5:56:55 PM PDT, 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.
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.
>>>>> Suzen, Mehmet <msuzen at gmail.com> >>>>> on Mon, 30 Oct 2017 11:16:30 +0100 writes:> 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. well... but your knowledge is severely (:-) outdated. Why did you not try first? source("https://raw.githubusercontent.com/msuzen/isingLenzMC/master/R/isingUtils.R") works for me even in R 3.3.0 which is really outdated itself!