Updating packages for 1.5.0 =========================== Package maintainers should be aware of the following changes to appear in 1.5.0. Some necessitate changes in many packages. This document is `work in progress' until feature freeze for 1.5.0 on April 8th. NA strings ---------- Missing values in strings are handled much more consistently, and a lot of sloppy coding will now fail (or give different answers). - If you meant "NA" to indicate the missing value, use as.character(NA) (or just NA where coercion will occur.) - The test x == "NA" should be rewritten as is.na(x). - If missing values can occur, do not use x == "some string". A suitable replacement is x %in% "some string". - Code such as all(names(x) == ans.names)) (from apply) will fail if any name might be missing. Use identical(names(x), ans.names) instead (which incidentally is more efficient). Although all the examples have used ==, the same considerations apply to the other logical operators != < <= > >=. The way missing strings print has been altered, so test output may need to be updated. Saving data ----------- The recommended way to distribute data has been via .rda files obtained with save(ascii=TRUE). As from 1.5.0 we can assume that XDR loading and compression are available on all platforms. The default save format was changed in 1.4.0. We now recommend that data is distributed in version 2 XDR format files (as given by save() in 1.4.0 or later), *and* that large data files are distributed in compressed format (save(compress=TRUE)). BLAS libraries -------------- R can be configured to use eiher a built-in subset of BLAS routines or an enhanced BLAS library such as ATLAS or sunperf. As from 1.5.0 the subset has been extended to include all the BLAS routines needed for double-precision calculations. To allow those R installations with an enhanced BLAS to benefit from them, we urge package maintainers *not* to include copies of the included BLAS routines in their packages. Also, all packages that make use of BLAS routines must include $(BLAS_LIBS) in src/Makevars, most simply as the line PKG_LIBS=$(BLAS_LIBS) If possible, test such packages both with and without an enhanced BLAS in use. Note that the CRAN checks are run on a system without an enhanced BLAS and so do not check this point. QA strictness ------------- R CMD check in 1.5.0 is more stringent: it now also fails on malformed 'Depends' and 'Maintainer' fields in 'DESCRIPTION' files, and on unbalanced braces in Rd files (which indicate Rd syntax errors). As in R, 'T' and 'F' are not read-only, package code should really use 'TRUE' and 'FALSE' for the logicals to safeguard against possible redefinitions by users. Therefore, future versions of R will run the R CMD check code tests with 'T' and 'F' set to 'NULL'. One can obtain the future behavior with R 1.5.0 by providing a non-null value for the variable R_CHECK_WITH_T_AND_F_AS_NULL in the environment in which R CMD check is run (e.g. via 'R_CHECK_WITH_T_AND_F_AS_NULL=yes R CMD check foo' if a Bourne shell is used). apply speedups -------------- Functions rowSums, colSums, rowMeans and colMeans provide considerable performance improvements over apply(X, f, sum) etc. Changes in the tcltk package ---------------------------- A new tclObj class, representing the internal "dual-ported" object structures in the Tcl C interface, has been introduced. The return value from many commands has been changed to be an object of class tclObj. Wherever you are currently using the return value, you will need to wrap the call in a tclvalue() construct in order to get at the string representation. However, notice that as.character, as.integer, and as.double can now extract vectors directly from tclObj objects so that parsing of the Tcl string can be avoided in many cases. Also tclVar objects can be accessed as tclObj objects. This should not break existing code, but it allows substantial simplification in the handling of e.g. listbox contents. Configure scripts ----------------- R CMD config is a new tool to to get the values of basic R configure variables, or the header and library flags necessary for linking against R. Packages with configure scripts which need to access these basic variables should use R CMD config, rather than attempting to directly retrieve the values from 'etc/Makeconf' as previously recommended. Packages which need to check for FORTRAN libraries can assume that the configure variable 'F77' provides the FORTRAN 77 compiler to use, even if R was configured to use the FORTRAN-to-C converter (for this case, a shell script wrapper to compile/link FORTRAN based on f2c is provided, which for the purpose of Autoconf can be used as the FORTRAN 77 compiler).