We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Adopted from Wiki entry)
Executables Rscript and R -f takes R script files as input and source():s them, e.g.
Rscript
R -f
source()
$ echo "cat('Hello\n')" > hello.R $ R --quiet -f hello.R > "cat('Hello\n')" [1] "cat('Hello\n')" > $ Rscript hello.R [1] "cat('Hello\n')"
This only works with local files. If we try with an online file, we get an error;
$ Rscript https://example.org/hello.R Fatal error: cannot open file 'https://example.org/hello.R': Invalid argument
A possible, but tedious, workaround is to use:
$ Rscript -e "source('https://example.org/hello.R')" Hello
Add support for Rscript and R -f to recognize URLs and then try to source them as URLs and not local files, e.g.
$ R --quiet -f https://example.org/hello.R > "cat('Hello\n')" [1] "cat('Hello\n')" > $ Rscript -f https://example.org/hello.R Hello
UPDATE: Fixed Rscript <url> example. /HB 2016-05-29
Rscript <url>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
(Adopted from Wiki entry)
Background
Executables
Rscript
andR -f
takes R script files as input andsource()
:s them, e.g.This only works with local files. If we try with an online file, we get an error;
$ Rscript https://example.org/hello.R Fatal error: cannot open file 'https://example.org/hello.R': Invalid argument
A possible, but tedious, workaround is to use:
$ Rscript -e "source('https://example.org/hello.R')" Hello
Wish
Add support for
Rscript
andR -f
to recognize URLs and then try to source them as URLs and not local files, e.g.UPDATE: Fixed
Rscript <url>
example. /HB 2016-05-29The text was updated successfully, but these errors were encountered: