-
Notifications
You must be signed in to change notification settings - Fork 2
/
150update.txt
128 lines (90 loc) · 4.66 KB
/
150update.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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).