Hello, I am trying to call R from Perl running on Windows 2000. I have looked through the previous posts regarding running R from Perl and all have referred to the RSPerl package at Omegahat. Unfortunately the documentation for this package specifically states that it only works in Unix at the moment. Does anyone else have any suggestions about the best way to do this in the Windows environment? Thanks Clive
Clive, Have a look at Statistics::R (http://search.cpan.org/~gmpassos/Statistics-R-0.02). I'm not sure if it works well with Windows, but it is the only other option that I know of to work directly with the R-interpreter. However, you can always create a batch file and write it to a file and then call R. Sean On Aug 18, 2004, at 3:09 PM, Clive Glover wrote:> Hello, > > I am trying to call R from Perl running on Windows 2000. I have looked > through the previous posts regarding running R from Perl and all have > referred to the RSPerl package at Omegahat. Unfortunately the > documentation for this package specifically states that it only works > in > Unix at the moment. Does anyone else have any suggestions about the > best > way to do this in the Windows environment? > > Thanks > > Clive > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html
Hi group, I am trying to get the LocusID numbers from my affy expression matrix. I instantiated rownames function to get an object with all the probe IDs.> where.affy.at <- rownames(gliexp)Now I wanted to get another object with the LocusIDs in it like the following. However, I get the following error. How come i = i +1 is not considered as incrementation here. I know there is some trouble in defining. I come from Python background so I am stuck. Could any one help me please.>for (i in where.affy.at){+ gene.locusid.affy <- get(i,env= hgu95av2LOCUSID) + i = i + 1 + gene.locusid.affy + } Error in i + 1 : non-numeric argument to binary operator Thank you. PS
What is gliexp? str(gliexp) would have been useful information to give. Assuming it is an R matrix, the rownames are _names_, not numbers. Surely in all languages with for loops it is bad idea to manipulate the loop index inside the loop, but you definitely cannot do arithmetic on character strings. R does have debugging facilities and it would be a good idea to get used to them. options(error=dump.frames) ... some work .... debugger() choose an environment i -- will tell you what it is. On Wed, 18 Aug 2004, S Peri wrote:> I am trying to get the LocusID numbers from my affy > expression matrix. > > I instantiated rownames function to get an object with > all the probe IDs. > > > where.affy.at <- rownames(gliexp) > > Now I wanted to get another object with the LocusIDs > in it like the following. However, I get the > following error. How come i = i +1 is not considered > as incrementation here. I know there is some trouble > in defining. I come from Python background so I am > stuck. Could any one help me please. > > > >for (i in where.affy.at){ > + gene.locusid.affy <- get(i,env= hgu95av2LOCUSID) > + i = i + 1 > + gene.locusid.affy > + } > Error in i + 1 : non-numeric argument to binary > operator-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595