Displaying 4 results from an estimated 4 matches for "kavaro".
Did you mean:
favaro
2006 Jul 14
2
R as shell script
...e scripts that can automatically select R
as the interpreter:
#!/usr/bin/R
cat("Hello world.\n")
This of course doesn't work, because /usr/bin/R is a shell script.
I have been able to create a binary wrapper that calls R with the
correct arguments, which is documented here:
http://kavaro.fi/mediawiki/index.php/Using_R_from_the_shell
This still lacks eg. standard input (but I have no idea how I can
implement it in R) and full command line argument passing (can be
done), but am I on the right track, or is there already something that
does what I need?
juha
2006 Jul 14
2
R as shell script
...e scripts that can automatically select R
as the interpreter:
#!/usr/bin/R
cat("Hello world.\n")
This of course doesn't work, because /usr/bin/R is a shell script.
I have been able to create a binary wrapper that calls R with the
correct arguments, which is documented here:
http://kavaro.fi/mediawiki/index.php/Using_R_from_the_shell
This still lacks eg. standard input (but I have no idea how I can
implement it in R) and full command line argument passing (can be
done), but am I on the right track, or is there already something that
does what I need?
juha
2008 May 28
1
R as shelll script
...er minded publishing it because it looked so obvious. However, a search
in the archives revealed there is no recent easy-to-use method proposed.
The latest reference I found is from 2006
(http://finzi.psych.upenn.edu/R/Rhelp02a/archive/81124.html) and even a c
wrapper has been proposed
(http://kavaro.fi/mediawiki/index.php/Using_R_from_the_shell).
So, here it goes an exceedingly simple example of my simple solution that
works pretty well:
#!/usr/local/bin/Rscript --vanilla
update.packages(ask=F, repos="http://cran.spsconsultoria.com")
# no need for calls to quit()
Now just chmod t...
2006 Aug 14
3
Making R script to run in a console
Hi,
is possible to make a R script to run under a console without open the R
environment?
Something like this example.R
#!/usr/bin/R
function(name="Put here your name") {
print(name)
}
In a console I make
./example.R name="Ronaldo Reis J?nior"
then program print my name.
It is possible?
Thanks
Ronaldo
--
A jury consists of twelve persons chosen to decide who has the