search for: myrscript

Displaying 5 results from an estimated 5 matches for "myrscript".

Did you mean: my_script
2012 Mar 01
2
Rscript example
Hi there, I am trying to find an example how to use Rscript Let's suppose I want to pass 3 arguments (I don't want [options] and -e [expressions] as described in help) *on the command line myRscript.R -arg1=value1 -arg2=value2 -arg3=value3 *In the script #! /path/to/Rscript args = commandArgs(TRUE); >From what I see args is just a string, do I do things correctly ? -- View this message in context: http://r.789695.n4.nabble.com/Rscript-example-tp4436130p4436130.html Sent from the R help m...
2010 Nov 17
2
Looking up the directory a file is located in
Hello everyone, This should be an easy question, I think. I'd like to write a command in a program to set the working directory to whatever directory the file is currently stored in. Suppose I have a file called "myRscript.r", and it's stored in "C:\Rprojects\myRscript.r", and it references other R scripts and data files in the same directory. If I enter the command > setwd("C:/Rprojects") I can then access all the files I need without typing the path. But suppose I want to move al...
2010 May 17
0
Unable to execute lm function within a Rscript launch in the Linux Terminal
Hello to the list I'm using a Rscript launched via the linux terminal as the title of this mail explains. The following is the code of the Rscript : myRscript.r -------------------------------- 1 #!/usr/bin/Rscript 2 3 #Read data 4 data=read.table("/home/morisseau/stage/recherche/gwas/data/CFHLC5/CFHLC_format_files_rm_07052010/output/windowstemp.txt") 5 6 data=t(data) 7 phen=read.table("/home/morisseau/stage/recherche/gwas/data/CFHLC/CFHLC...
2012 Jul 02
1
Dependency problem for "hasArg"
...Error in plot2(x = sim, y = obs, plot.type = "single", main = paste("Daily", : could not find function "hasArg" Calls: plot_results -> plot_out -> ggof -> plot2 However, if I call EXACTLY the same script from the R console, by using > source("myRscript.R") I do not get any error. As you can see in the error message, the function 'plot_results' calls 'plot_out' (both in the hydroPSO package). Then 'plot_out' calls the function 'ggof', which in turn calls 'plot2' (the latter 2 in the hydroGOF packa...
2002 Apr 11
3
Mods that allow R scripts
I've hacked R so that it can be used to write shell and/or CGI scripts, e.g. "hello world" can be written as: #!/usr/local/lib/R/bin/R.bin --script cat("Hello, World!\n"); The mods required to enable this aren't particularly major. (Adds about 70 lines of code, IIRC.) Anyone else interested in adding this to the R core? -- Neil D. McKay, Mail Code 480-106-359