Thank you all - these suggestions have been very helpful! I've got it doing
what I wanted know, and I appreciate the help!
Emily
On Jan 27, 2013, at 1:18 PM, Rui Barradas wrote:
> Hello,
>
> Try the following. Create a file called test.R with these instructions:
>
> cmd <- commandArgs(TRUE)
Hello,
Try the following. Create a file called test.R with these instructions:
cmd <- commandArgs(TRUE)
if(any(grepl("--ext", cmd))){
suffix <- cmd[grep("--ext", cmd)]
suffix <- unlist(strsplit(suffix, ":"))[2]
fl <- paste0("test_", suffix, ".txt") # underscore included
}
Hi,
It sounds like you just want to write a command line script using R
and you would pass the suffix/prefix as command line args, no?
Why not just go with what Peter has already suggested with
`commandArgs`, or if you want a more feature-rich command line arg
parser, you can try:
http://cran.r-
Hello all (again),
I received a very helpful answer to this question, and would like to pose one
more:
Right now I have this script, which is being called from the command line,
writing output to two generically named files ("pvalues" and "qvalues") that
are named in the script using the lin
On Jan 27, 2013, at 08:33 , Emily Sessa wrote:
> Hi all,
>
> I am trying to use the scan function in an R script that I am calling from
> the command line on a Mac; at the shell prompt I type:
>
> $ Rscript get_q_values.R LRT_codeml_output
>
> in the hope that LRT_codeml_output will get pa
Hi all,
I am trying to use the scan function in an R script that I am calling from the
command line on a Mac; at the shell prompt I type:
$ Rscript get_q_values.R LRT_codeml_output
in the hope that LRT_codeml_output will get passed to the get_q_values R
script. The first line of that script
6 matches
Mail list logo