[R] compatibility between R 2.7.0 and 2.8.1

Rheannon rbrooks at uvic.ca
Mon Jun 1 21:14:57 CEST 2009


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 


-- 
View this message in context: http://www.nabble.com/compatibility--between-R-2.7.0-and-2.8.1-tp23820222p23820222.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list