> To: lig...@statistik.tu-dortmund.de
> CC: r-help@r-project.org
> Subject: Re: [R] Running R from windows command prompt
> 
> Thanks for your help.
> 
> I tried the way you mentioned for my first question. But I am not getting
> any results.
> Can you please explain in detail the process through which I can run a R
> code from windows command prompt.

While your problem likely has nothing to do with windoh's, I would suggest
you go get cygwin ( see google) and use that. I and probably others
have lots of scripts that work there and on linux. Bash scripts are
a better way to proceed if you want to do more than a test case and
they integrate with lots of other existing things. 


> 
> 2011/6/28 Uwe Ligges <lig...@statistik.tu-dortmund.de>
> 
> >
> >
> > On 28.06.2011 11:54, siddharth arun wrote:
> >
> >> 1. I have a R program in a file say "functions.R".
> >> I load the "functions.R" file the R using source("function.R") and then
> >> call
> >> functionsf1(), f2() etc. which are declared and defined within
> >> "function.R"
> >>  file.
> >> I also need to load a couple of R libraries using library() before I can
> >> use f1(), f2() etc.
> >>
> >> My question is can I acheive all this (i.e. calling function f1() and
> >> f2())
> >> from the windows prompt without opening the R environment ? If yes then
> >> how?
> >>
> >
> >
> > Put all the code into a file, e.g. "foo.R", and run
> >
> > R CMD BATCH foo.R from the windows command shell.
> >
> >
> >
> >  2. Also, Is there any way to scan strings directly. Like scan() function
> >> only scans numerical values. Is there any way to scan strings?
> >>
> >
> > Yes, it is called scan() which is for arbitrary data, including
> > character(). See ?scan. Otherwise, you may want to look into ?readLines
> >
> > Uwe Ligges
> >
> >
> 
> 
> -- 
> Siddharth Arun,
> 4th Year Undergraduate student
> Industrial Engineering and Management,
> IIT Kharagpur
> 
>       [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to