Reputation: 493
I have inherited a project developed and debugged in R 3.6.1. Should I expect it to work on R 4.0.x (currently most recent version is 4.0.3)?
Upvotes: 0
Views: 1070
Reputation: 368261
Yes.
R almost always is, without exception.
One recent minor issue (affecting 3.6.0 relative to earlier verions) was related to a bub fix to the uniform random number generator making previously generated sequences (used also for sampling) different from current ones, but even that was very well signalled. See the files NEWS.Rd, NEWS.3.Rd, NEWS.2.Rd, NEWS.1 and NEWS.0 for the very careful, very explicit lists of changes.
Best of all you don't even have to trust my word. You could install R 4.0.* as a Docker container and try your code and convince yourself.
Edit: I happen to maintain R for Debian and also Docker, so I have several version of the container here. Witness how the following code to draw three N(0,1) numbers gets the same result for four different years of R. Had I more containers or older R here I could show more.
edd@rob:~$ docker run --rm -ti r-base:3.3.1 Rscript -e 'set.seed(42); rnorm(3)'
[1] 1.3709584 -0.5646982 0.3631284
edd@rob:~$ docker run --rm -ti r-base:3.4.4 Rscript -e 'set.seed(42); rnorm(3)'
[1] 1.3709584 -0.5646982 0.3631284
edd@rob:~$ docker run --rm -ti r-base:3.5.3 Rscript -e 'set.seed(42); rnorm(3)'
[1] 1.3709584 -0.5646982 0.3631284
edd@rob:~$ docker run --rm -ti r-base:3.6.3 Rscript -e 'set.seed(42); rnorm(3)'
[1] 1.3709584 -0.5646982 0.3631284
edd@rob:~$ docker run --rm -ti r-base:4.0.3 Rscript -e 'set.seed(42); rnorm(3)'
[1] 1.3709584 -0.5646982 0.3631284
edd@rob:~$
Upvotes: 5