[R] compatibility between R 2.7.0 and 2.8.1

Uwe Ligges ligges at statistik.tu-dortmund.de
Tue Jun 2 11:42:46 CEST 2009


Perhaps the real solution is to upgrade to R-2.9.0 and patch RPy so that 
it works with recent versions of R. The maintainer of RPy might be happy 
about patches.

Best,
Uwe Ligges




Rheannon wrote:
> Hello,
> 
> I have some R code that I wrote with version 2.8.1 and have since needed to
> revert back to version 2.7.0 in order to run my R code with RPy for Python.
> R version 2.7.1 is the latest version RPy supports. My issue is my code is
> no longer running properly and I was hoping someone might be able to help
> me. I am wondering if there are certain functions that I am using that are
> not supported in the older version of R.
> 
> I have uploaded the R file I am running and the error message I am receiving
> after this section of code is as follows:
>  #sum AFDD between FN and LN, excluding positive values
>> for(i in 1:R){
> + for(j in FN[i]:LN[i]){
> + if(Growth_period[i,j]<0)
> + AFDD[i] <- AFDD[i] + sum(Growth_period[i,j])}}
> Error in if (Growth_period[i, j] < 0) AFDD[i] <- AFDD[i] +
> sum(Growth_period[i,  : 
>   argument is of length zero
> 
> When I run the same code in 2.8.0 there does not seem to be a problem. More
> interestingly, in version 2.7.1 when I keep the input files the same, the
> outputs do not match!? Which makes it harder to locate the exact cause of
> the issue......
> 
> If anyone can see a particular function I am using that does not well in the
> older vresion or has any suggestions that would be very helpful.
> 
> Cheers,
> R
> 
> http://www.nabble.com/file/p23820222/Validation_Hydro_year_post.txt
> Validation_Hydro_year_post.txt 
> 
>




More information about the R-help mailing list