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 that I’d like to make available for use but isn’t ready to be packaged yet. So it would be great to give people a single file to source from the web (that will then source all the individual function files).
On closer inspection, the problem appears to be https. How would I source this file?
https://raw.github.com/hadley/stringr/master/R/c.r
Yes you can, try running this R tutorial:
(Source)
Https is only supported on Windows, when R is started with the
--internet2command line option (see FAQ):Without this option, or on linux, you will get the error “unsupported URL scheme”. In that case resort to the solution suggested by @ulidtko, or:
Here is a way to do it using
RCurl, which also supports https:(You can remove the
ssl.verifypeerif the ssl certificate is valid)