[Rd] new warnings related to the extractor "$" with R 2.5.0alpha
Dear all, I just installed R 2.5.0alpha and noticed new warnings related to the extractor "$" when using contributed packages. For instance: > library(RODBC) Warning message: $ operator is not valid for atomic vectors, returning NULL > library(aod) Package aod, version 1.1-18 > data(orob2) > m1 <- betabin(cbind(y, n-y) ~ 1, random = ~ 1, data = orob2) > head(residuals(m1)) 1 2 3 4 5 6 -1.4629774 -0.7897877 -1.3754283 0.1029910 -0.3556985 1.4030026 Warning message: $ operator not defined for this S4 class, returning NULL In these two cases, I deleted the former installations and re-built the packages from sources. How to overcome this problem ? Kind regards, Renaud ## > sessionInfo() R version 2.5.0 alpha (2007-03-30 r40957) i386-pc-mingw32 locale: LC_COLLATE=French_France.1252;LC_CTYPE=French_France.1252;LC_MONETARY=French_France.1252;LC_NUMERIC=C;LC_TIME=French_France.1252 attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "tcltk" "methods" "base" other attached packages: aodRODBC fortunes svIO R2HTML svMisc svSocketsvIDE "1.1-18" "1.1-8" "1.3-2" "0.9-5" "1.58" "0.9-5" "0.9-5" "0.9-5" -- Renaud LANCELOT Département Systèmes Biologiques du CIRAD CIRAD, Biological Systems Department Campus International de Baillarguet TA 30 / B F34398 Montpellier Tel +33 (0)4 67 59 37 17 Secr. +33 (0)4 67 59 37 37 Fax +33 (0)4 67 59 37 95 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] new warnings related to the extractor "$" with R 2.5.0alpha
On Sun, 1 Apr 2007, Renaud Lancelot wrote: > Dear all, > > I just installed R 2.5.0alpha and noticed new warnings related to the > extractor "$" when using contributed packages. For instance: > >> library(RODBC) > Warning message: > $ operator is not valid for atomic vectors, returning NULL > >> library(aod) > Package aod, version 1.1-18 >> data(orob2) >> m1 <- betabin(cbind(y, n-y) ~ 1, random = ~ 1, data = orob2) >> head(residuals(m1)) > 1 2 3 4 5 6 > -1.4629774 -0.7897877 -1.3754283 0.1029910 -0.3556985 1.4030026 > Warning message: > $ operator not defined for this S4 class, returning NULL > > In these two cases, I deleted the former installations and re-built > the packages from sources. > > How to overcome this problem ? Wait for package updates. For RODBC, it is harmless but the warning will not appear in 1.1-9 (which will be released before R 2.5.0 is). (The first message is not really right: $ for lists was valid and documented to return NULL in released versions of R, as it was in the Blue Book. It should say that it is 'deprecated' in R 2.5.0, since this amounts to a change of language definition and that should be giving a warning of deprecation.) Later versions of R 2.5.0 alpha give more informative messages. -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] new warnings related to the extractor "$" with R 2.5.0alpha
Thank you for this explanation. As the package maintainer for aod (second warning message), I found where the warning came from and will post an update soon. Kind regards, Renaud 2007/4/1, Prof Brian Ripley <[EMAIL PROTECTED]>: > On Sun, 1 Apr 2007, Renaud Lancelot wrote: > > > Dear all, > > > > I just installed R 2.5.0alpha and noticed new warnings related to the > > extractor "$" when using contributed packages. For instance: > > > >> library(RODBC) > > Warning message: > > $ operator is not valid for atomic vectors, returning NULL > > > >> library(aod) > > Package aod, version 1.1-18 > >> data(orob2) > >> m1 <- betabin(cbind(y, n-y) ~ 1, random = ~ 1, data = orob2) > >> head(residuals(m1)) > > 1 2 3 4 5 6 > > -1.4629774 -0.7897877 -1.3754283 0.1029910 -0.3556985 1.4030026 > > Warning message: > > $ operator not defined for this S4 class, returning NULL > > > > In these two cases, I deleted the former installations and re-built > > the packages from sources. > > > > How to overcome this problem ? > > Wait for package updates. For RODBC, it is harmless but the warning will > not appear in 1.1-9 (which will be released before R 2.5.0 is). > > (The first message is not really right: $ for lists was valid and > documented to return NULL in released versions of R, as it was in the Blue > Book. It should say that it is 'deprecated' in R 2.5.0, since this > amounts to a change of language definition and that should be giving a > warning of deprecation.) > > Later versions of R 2.5.0 alpha give more informative messages. > > -- > Brian D. Ripley, [EMAIL PROTECTED] > Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ > University of Oxford, Tel: +44 1865 272861 (self) > 1 South Parks Road, +44 1865 272866 (PA) > Oxford OX1 3TG, UKFax: +44 1865 272595 > -- Renaud LANCELOT Département Systèmes Biologiques du CIRAD CIRAD, Biological Systems Department Campus International de Baillarguet TA 30 / B F34398 Montpellier Tel +33 (0)4 67 59 37 17 Secr. +33 (0)4 67 59 37 37 Fax +33 (0)4 67 59 37 95 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] checking existence of active bindings
On Wednesday 28 March 2007 23:56, Tony Plate wrote: > Is there any way to check whether an active binding exists without > actually calling the active binding? I'd like to be able to do > something like exists("x", ...) and know whether "x" exists without > actually fetching its value if it is an active binding (because it could > consume significant resources to fetch the value). > > > exists("x", inherits=FALSE) > > getting x1 > [1] TRUE > As you most probably found out for yourself - this works as intended. > "x" %in% ls(globalenv()) [1] TRUE Best, Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Non-unique column names in data frames
Dear r-devel members, It's just been brought to my attention that R permits non-unique column names in data frames -- e.g., via assignment to names() or colnames(). This behaviour is consistent with the help files (as I discovered), but it's not consistent with the behaviour of rownames() and row.names(). For example, row.names(airquality) <- rep("a", nrow(airquality)) generates an error, but names(airquality) <- rep("a", ncol(airquality)) or even names(airquality) <- rep("", ncol(airquality)) do not. I figure that there must be some rationale for this difference, but I can't think of what it might be. Any thoughts? Regards, John John Fox Department of Sociology McMaster University Hamilton, Ontario Canada L8S 4M4 905-525-9140x23604 http://socserv.mcmaster.ca/jfox __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Bug with Sys.glob?
When I run the example command of Sys.glob(), R crashes. > Sys.glob(file.path(R.home(), "library", "*", "R", "*.rdx")) > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status alpha major 2 minor 5.0 year 2007 month 03 day30 svn rev40957 language R version.string R version 2.5.0 alpha (2007-03-30 r40957) > -- Ronggui Huang Department of Sociology Fudan University, Shanghai, China __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel