t;"Control"
>if the lable for the ## reference group is 'Control')
>
>## Dunnett
>dunnett.test <- function(resp, group, alpha, vehicle)
>{
>
>
> result <- data.frame(label=label, estimate=estimate, alpha=alpha,
>lower=lower, upper=upper, p.va
14, 2012 3:32 AM
To: Cem Girit
Cc: r-help@r-project.org
Subject: Re: [R] Writing R-scripts
On 02/14/2012 08:59 AM, Cem Girit wrote:
> Hello,
>
> This is my first attempt to write a script in R. The program below
is
> intended to do some parametric tests on group data. There
On 02/14/2012 08:59 AM, Cem Girit wrote:
Hello,
This is my first attempt to write a script in R. The program below
is intended to do some parametric tests on group data. There are subroutines
for each type of test. The call to the "parametric.tests", routine sets the
argument "testtype"
It seems all you are doing in the if statements is defining functions.
You need to actually "apply" them to some arguments, then you can pass
results.
i.e.
f<- function(x,type,...){
a<- function(...){ 2* x }
b<- function(...) { x^2 }
if(type==1){ ret<- a(x) }
if(type==2){ ret<- b(x) }
ret
}
You
Hello,
This is my first attempt to write a script in R. The program below
is intended to do some parametric tests on group data. There are subroutines
for each type of test. The call to the "parametric.tests", routine sets the
argument "testtype" for the test to be used. How can I transfer
Put this line in a file called test.R:
cat("command args are:\n"); print(commandArgs())
and then call it like this from the shell or Windows cmd line assuming
that Rscript is in your path:
Rscript test.R abc def
On Wed, Sep 9, 2009 at 2:37 PM, Abhishek Pratap wrote:
> Hi All
> Thanks for the p
Hi All
Thanks for the pointers. reading them I see that what I intend to can
certainly be done without much pain. However with my test scripts I am not
able to fully understand Rscript. The ?Rscript option doesnt print out a lot
to help me get the minute details.
Any good example/s or some info on
Abhishek Pratap wrote:
>
>
> 1. What's the best way to pass command line arguments to R scripts ?
>
>
As Gabor mentioned, the commandArgs function and the getopt package provide
some excellent starting points for this.
Abhishek Pratap wrote:
>
>
> 2. How to execute R scripts from comman
See ?commandArgs, the getopt package and ?Rscript
On Mon, Sep 7, 2009 at 1:47 PM, Abhishek Pratap wrote:
> Hi Guys
> I am Abhishek, primarily a bioinformatician. I have recently started using
> a lot of R thanks to some excellent packages available.
>
> Lately I have felt the need to batch proces
Hi Guys
I am Abhishek, primarily a bioinformatician. I have recently started using
a lot of R thanks to some excellent packages available.
Lately I have felt the need to batch process few of the R scripts I have
been working with and strangely enough I am not able to find a good resource
on how t
10 matches
Mail list logo