Updating packages for 1.7.0 =========================== Package maintainers should be aware of the following changes scheduled to appear in 1.7.0. The `methods' package is attached by default, and the behaviour is now intended to be as far as possible the same whether or not `methods' is attached. The following packages are attached in a `factory-fresh' install: ctest, methods, modreg, mva, nls, ts so please check for any new conflicts. Note though that users are allowed to run R without any of these packages attached, so your code (and particularly your examples) cannot assume their presence. methods-related changes ----------------------- Current generic functions that call, say, UseMethod("abc") may behave differently if there are functions named, for example, abc.matrix, abc.numeric, abc.character, etc. Because matrices have class "matrix", the function abc.matrix will be treated as a method for function abc() when the first argument is a matrix. You will need to rename the function, for example to abcMatrix instead of abc.matrix. This applies also if you have a function named in this way for one of the generic functions in base or another required package: for example, plot.matrix would be interpreted as a plot method for matrix objects. print.matrix() only exists for backwards compatibility: it is the same as print.default(). Very likely print.matrix was used for the right=TRUE argument that S's print.default does not have, but this is unnecessary. If you want the call sequence of print.matrix, use prmatrix instead. Also, note that print prints the attributes of the matrix whereas prmatrix does not. Constructions that used is.null(class(x)) will probably not work as intended, as all objects now have a class. The construction if(is.null(class(x))) class(x) <- data.class(x) UseMethod("foo") can be replaced by if(is.null(oldClass(x))) oldClass(x) <- data.class(x) UseMethod("foo") if it is intended to blur the distinction between "integer" and "numeric" classes, and otherwise the first line may be omitted. (The only distinction between the class given by data.class() and that given by class() and used for dispatch by UseMethod is that data.class() reports "numeric" for integer vectors.) [If you want code to be compatible with < 1.7.0 versions of R, use if(is.null(attr(x, "class"))) attr(x, "class") <- data.class(x) ] Unless the package makes use of setMethod (methods), loading can be speeded up (unless `methods' is not loaded) by having an object called .noGenerics (with any value) in the package. Namespaces ---------- Packages other than `base' can have a namespace, and several of the base and recommended packages do. This means that many internal objects are no longer user-visible, and that method functions need not be. Do not call methods directly unless absolutely essential: call predict() rather than predict.loess() for example. You may want to consider adding a namespace to your package: the documentation is in `Writing R Extensions'. Other changes ------------- The default random number generators have been changed: see the NEWS file and ?RNGversion. solve.default() now uses LAPACK by default, and works as documented, on _square matrices_ `a'. Some packages have been using it for QR decompositions (which was documented in S but not in R: use solve() but not solve.default()) or even for length-1 vectors (just divide). One package was using it for over-determined rectangular systems: use qr() and qr.solve() for those. Packages should not execute code with side effects in their .R files. If you have require() or options() statements at the top level in such files, please move them to .First.lib (or .onLoad if a namespace is in use for the package). This is necessary for the experiments with saving objects in databases, a feature planned for 1.8.x. A full double-precision LAPACK library Rlapack.{so,sl,dll,dylib} is installed with R, unless a high-performance LAPACK library was found at configure time. If your package makes use of LAPACK, please convert it to use this via $(LAPACK_LIBS) $(BLAS_LIBS) in PKG_LIBS in Makevars.