[R] FW: Qury Related With R
bed.singh at oracle.com
bed.singh at oracle.com
Mon Jul 27 15:10:26 CEST 2009
Hi Romain,
Exactly this is the script which I need. Thanks a lot for helping.
Romain, Is there any way to modified a particular line in the property file through R script? If yes then please explain how.
Cheers!
BS
-----Original Message-----
From: Romain Francois [mailto:romain.francois at dbmail.com]
Sent: Monday, July 27, 2009 12:53 PM
To: bed.singh at oracle.com
Cc: r-help at r-project.org
Subject: Re: [R] FW: Qury Related With R
Hi,
I think you can just do something like read the parameters into R, and
then use the "parameters" argument of the .jinit function. Something
like this perhaps:
props <- readLines( "app.properties" )
props <- strsplit( gsub( "\\\t", "", grep( "=", props, value = TRUE )
), "=" )
params <- sapply( props, function(x){
sprintf( "-D%s=%s", x[1], x[2] )
} )
library(rJava)
.jinit(classpath="D:/R_BTE_Jar/BTE/BackTestingApp.jar",
parameters= c( "-Xmx512m", params ) )
Let me know if this works.
Romain
On 07/27/2009 06:02 AM, bed.singh at oracle.com wrote:
> Hi Romain,
>
> Attached is my R script that script I put into the R work space and
> through source("RScriptToCallJava.R") command I call the script and my
> java application is execute.
>
> Is it the proper way to call the java application? If not, then please
> can you explain the directory structure that needs for java application?
>
> In java I used the property file. but when I load the property file
> using .jaddClassPath("D:/R_BTE_Jar/BTE/app.properties") command, it is
> not load.
>
> Thanks Romain for your response.
>
> Bed Singh
>
> -----Original Message-----
> From: Romain Francois [mailto:romain.francois at dbmail.com]
> Sent: Saturday, July 25, 2009 6:32 PM
> To: bed.singh at oracle.com
> Cc: r-help at r-project.org
> Subject: Re: [R] FW: Qury Related With R
>
> Hi,
>
> The file did not make it through the mailing list. Maybe you are looking
>
> for ?read.dcf
>
> Can you describe the way your application interacts with R.
>
> Romain
>
> On 07/25/2009 10:35 AM, bed.singh at oracle.com wrote:
>
> > Hi,
>
> >
>
> > I am using the R-2.9.1 with Window XP.
>
> > Queries:
>
> > 1. I am running the java application which needs to load property
> file in R.
>
> > So can you please tell me how I can load my property file in R
> session so that my application can find that property file?
>
> > Attached is my property file for sample.
>
> > 2. Is there any directory structure required for java application in
> R format?
>
> >
>
> > Thanks& Regards,
>
> > Bed Singh
>
> >
>
> > From: ericdoviak at gmail.com [mailto:ericdoviak at gmail.com] On Behalf Of
> Eric Doviak
>
> > Sent: Friday, July 24, 2009 8:42 PM
>
> > To: bed.singh at oracle.com
>
> > Subject: Re: Qury Related With R
>
> >
>
> >
>
> >
>
> > Hi Bed,
>
> >
>
> > I'm sorry. I simply don't know.
>
> > Your best bet would be to ask on R-help: r-help at r-project.org
>
> >
>
> >
>
> >
>
> > Good luck,
>
> > - Eric
>
> >
>
> > bed.singh at oracle.com wrote:
>
> >
>
> > Hi Eric,
>
> >
>
> > I am using the R-2.9.1 with Window XP.
>
> >
>
> > Queries:
>
> >
>
> > I am running the java application which needs to load app.property
> file in R.
>
> >
>
> > So can you please tell me how I can load my property file in R
> session so that my application can found that property file?
>
> >
>
> > Attached is my property file.
>
> >
>
> > Is there any directory structure required for java application in R
> format?
>
> > Please help me. Thanks in Advance Eric.
>
> >
>
> Regards,
>
> >
>
> > Oracle logo.gif
>
> > Bed Singh
>
> > Oracle Financial Services PrimeSourcing
>
> > Mumbai, India
>
> > Oracle Financial Services Software Limited was formerly i-flex
> solutions limited.
>
> Romain Francois
>
> Independent R Consultant
>
> +33(0) 6 28 91 30 30
>
> http://romainfrancois.blog.free.fr
>
> |- http://tr.im/tlNb : RGG#155, 156 and 157
>
> |- http://tr.im/rw0p : useR! slides
>
> `- http://tr.im/rw0b : RGG#154: demo of atomic functions
>
--
Romain Francois
Independent R Consultant
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/tlNb : RGG#155, 156 and 157
|- http://tr.im/rw0p : useR! slides
`- http://tr.im/rw0b : RGG#154: demo of atomic functions
More information about the R-help
mailing list