[Rd] NEWS and ChangeLog in available.packages()
With the newly available NEWS and ChangeLog links on the CRAN pages for packages it would be nice if available.packages() gave information on those. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Perils of R_LIBRARY_PATH
Prof Brian Ripley wrote: On Sat, 16 Feb 2008, Hin-Tak Leung wrote: Hi, Just for interest, may I ask which platform are you referring to? You are on a commercial unix platform such as solaris, right? amd64 Linux -- a bit of tracing shows that to be from a jpackage-d version of the Sun SDK. So my guess is that the packaging picked up the libs (I didn't install that particular JDK). Hmm, maybe you should file a bug to the jpackage people. My 1.4/1.5/1.6 came from http://java.sun.com/ - 1.5 and 1.6 are x86_64, 1.4 is i686, and they don't have any gtk/cairo shared libraries. The sun jdk's from sun don't play nice with the alternative system though (whereas the jpackage does). As a long term strategy , sun jdk 1.7 and gcj came with fedora 8. gcj starts to work quite well, so it might be a good idea to support that too. snipped Solaris 10 has Gtk2 but not cairo (which is relevant as R will have a cairo-based version of X11). Gtk(2?) is an offical optional add-on to Tru64. (mostly just because mozilla needs it, I think...) Hin-Tak __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] NEWS and ChangeLog in available.packages()
On Feb 18, 2008 11:59 AM, Martin Maechler [EMAIL PROTECTED] wrote: GaGr == Gabor Grothendieck [EMAIL PROTECTED] on Mon, 18 Feb 2008 10:19:05 -0500 writes: GaGr With the newly available NEWS and ChangeLog links on GaGr the CRAN pages for packages it would be nice if GaGr available.packages() gave information on those. how would you propose? It returns a character matrix, and that probably should not be changed. Currently the Depends (and Imports, Contains and Suggests) are character strings containing components to form one large string so maybe there could be a Docs whose substrings could include NEWS, ChangeLog and the vignette and demo names or maybe separate ones for NEWS/ChangeLog, vignettes and demos. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] NEWS and ChangeLog in available.packages()
GaGr == Gabor Grothendieck [EMAIL PROTECTED] on Mon, 18 Feb 2008 10:19:05 -0500 writes: GaGr With the newly available NEWS and ChangeLog links on GaGr the CRAN pages for packages it would be nice if GaGr available.packages() gave information on those. how would you propose? It returns a character matrix, and that probably should not be changed. Regards, Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Namespace and function open
MS == Markus Schmidberger [EMAIL PROTECTED] on Fri, 15 Feb 2008 15:47:16 +0100 writes: MS Hello, I built a package, everything was working very MS well. Now I included a NAMESPACE to export only some MS variables. (export(f, g, ...) ) Everything is working MS fine, except one function. There I get an error: MS Fehler in UseMethod(open) : keine anwendbare Methode MS für open MS In this function I use the function open to generate MS an output bar. MS * if (verbose) { pbt - new(ProgressBarText, MS length(ids), barsteps = as.integer(20)) open(pbt) } MS for (i in seq(along=ids)) { MS if (verbose) { update(pbt) } MS How I have to change my NAMESPACE file to fix this MS problem? You also have to export the *methods* for the open() generic: exportMethods(open) MS Thanks Markus Schmidberger you're welcome, Martin Mächler __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] NAMESPACEs and S4 classes
Let's start from a simpler description, because the use of sealed adds some confusion. Here's a basic version. I have two packages, P2 and P3, with different definitions of myClass. Classes with the same name on two packages are supposed to work, at least for generating objects. There is a bug (see below) and a workaround, but with or without the workaround you need to apply new() to a class _object_, not just a name, if you want to generate objects in the global environment. Here's what currently works, using the workaround: c2 = get(classMetaName(myClass), envir = asNamespace(P2)) c3 = get(classMetaName(myClass), envir = asNamespace(P3)) x2 = new(c2) x3 = new(c3) class(x2) [1] myClass attr(,package) [1] P2 class(x3) [1] myClass attr(,package) [1] P3 By using asNamespace(), it's not necessary to export the class definitions, and possibly better not to. Two comments: - The bug is that you should be able to use c2 = getClass(myClass, asNamespace(P2)) instead of the call to get(). But a current misuse of cached definitions means that only the first definition is known. Hence the need for a workaround using classMetaName() to get the class definition directly. I think the fix is easy will try to add it to r-devel fairly soon. - There are limitations to using duplicated class names, because not all computations will carry the appropriate package information to say which myClass we mean. So if one can avoid duplicating class names, life will be easier, and I suspect that duplicated classes that are _not_ exported will work better, because computations will be forced into the individual namespaces with less chance for getting the wrong definition. Martin Morgan wrote: I'd like to have two packages with S4 classes with the same name but different implementation. To that end I create a package tmpA with setClass(A, representation=representation( x=numeric), sealed=TRUE) setClass(B, representation=representation( x=numeric)) B - function(...) new(B, ...) and a NAMESPACE having only import(methods) export(B) I duplicate this package source directory structure, renaming the duplicate package tmpB in its Description file. After R CMD INSTALL'ing both, I library(tmpA) library(tmpB) Error in setClass(A, representation = representation(x = numeric), : A has a sealed class definition and cannot be redefined Error : unable to load R code in package 'tmpB' Error: package/namespace load failed for 'tmpB' setClass(A, prototype(y=numeric)) Error in setClass(A, c(y = numeric)) : A has a sealed class definition and cannot be redefined It appears that, although 'where' in setClass influences the location of the class definition, there is a global class table that means only one class of a particular name can ever be defined. Is that the intended behavior? If I create a class B in the global environment setClass(B, representation(y=numeric)) [1] B and then use the constructor from tmpA, I end up with an instance of the globally defined class B, rather than the one defined in the constructor's name space: B() An object of class B Slot y: numeric(0) How would I write B to return an instance of B as defined in tmpA? Thanks, Martin sessionInfo() R version 2.7.0 Under development (unstable) (2008-02-09 r44397) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C attached base packages: [1] stats graphics grDevices datasets utils methods base other attached packages: [1] tmpA_1.0 [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Namespace and function open
On Mon, 18 Feb 2008, Martin Maechler wrote: MS == Markus Schmidberger [EMAIL PROTECTED] on Fri, 15 Feb 2008 15:47:16 +0100 writes: MS Hello, I built a package, everything was working very MS well. Now I included a NAMESPACE to export only some MS variables. (export(f, g, ...) ) Everything is working MS fine, except one function. There I get an error: MS Fehler in UseMethod(open) : keine anwendbare Methode MS für open MS In this function I use the function open to generate MS an output bar. MS * if (verbose) { pbt - new(ProgressBarText, MS length(ids), barsteps = as.integer(20)) open(pbt) } MS for (i in seq(along=ids)) { MS if (verbose) { update(pbt) } MS How I have to change my NAMESPACE file to fix this MS problem? You also have to export the *methods* for the open() generic: exportMethods(open) He doesn't say he created any. I think more likely he did not import the S4 generics methods from the BioC package 'affy'. Since open() is in the base namespace, it will be found instead of any such-named function in another package unless imported. But really we need a lot more information: package 'affy' is not even mentioned, if it is indeed the source of class ProgressBarText. As so often, the output of sessionInfo() (as mentioned in the posting guide) is the 'at a minimum' information needed. MS Thanks Markus Schmidberger you're welcome, Martin Mächler __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- 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
[Rd] Is rcompgen still recommended?
I just built R-devel from source on OS X (Tiger), using the subversion sources. Running ./tools/rsync-recommended didn't download rcompgen. I checked http://cran.r-project/src/contrib/2.7.0/Recommended and indeed, this package is not there. If I try to install using install.packages I get install.packages(rcompgen, type=source) --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL 'http://cran.fhcrc.org/src/contrib/rcompgen_0.1-17.tar.gz' Content type 'application/x-gzip' length 29240 bytes (28 Kb) opened URL == downloaded 28 Kb * Installing *source* package 'rcompgen' ... Error: Invalid DESCRIPTION file Invalid Priority field. Packages with priorities 'base' or 'recommended' or 'defunct-base' must already be known to R. See the information on DESCRIPTION files in section 'Creating R packages' of the 'Writing R Extensions' manual. Execution halted ERROR: installing package DESCRIPTION failed ** Removing '/Users/jmacdon/R-devel/library/rcompgen' The downloaded packages are in /private/tmp/Rtmpb0Refs/downloaded_packages Updating HTML index of packages in '.Library' Warning message: In install.packages(rcompgen, type = source) : installation of package 'rcompgen' had non-zero exit status I assume I am missing something obvious, but don't know what it is. Any pointers? Best, Jim sessionInfo() R version 2.7.0 Under development (unstable) (2008-02-18 r44516) i386-apple-darwin8.11.1 locale: C attached base packages: [1] stats graphics grDevices datasets utils methods base loaded via a namespace (and not attached): [1] tcltk_2.7.0 tools_2.7.0 -- James W. MacDonald, MS Biostatistician UMCCC cDNA and Affymetrix Core University of Michigan 1500 E Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Is rcompgen still recommended?
James MacDonald wrote: I just built R-devel from source on OS X (Tiger), using the subversion sources. Running ./tools/rsync-recommended didn't download rcompgen. I checked http://cran.r-project/src/contrib/2.7.0/Recommended and indeed, this package is not there. If I try to install using install.packages I get install.packages(rcompgen, type=source) --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL 'http://cran.fhcrc.org/src/contrib/rcompgen_0.1-17.tar.gz' Content type 'application/x-gzip' length 29240 bytes (28 Kb) opened URL == downloaded 28 Kb * Installing *source* package 'rcompgen' ... Error: Invalid DESCRIPTION file Invalid Priority field. Packages with priorities 'base' or 'recommended' or 'defunct-base' must already be known to R. See the information on DESCRIPTION files in section 'Creating R packages' of the 'Writing R Extensions' manual. Execution halted ERROR: installing package DESCRIPTION failed ** Removing '/Users/jmacdon/R-devel/library/rcompgen' The downloaded packages are in /private/tmp/Rtmpb0Refs/downloaded_packages Updating HTML index of packages in '.Library' Warning message: In install.packages(rcompgen, type = source) : installation of package 'rcompgen' had non-zero exit status I assume I am missing something obvious, but don't know what it is. Any pointers? utils::rc.TABTAB -- O__ Peter Dalgaard Øster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Is rcompgen still recommended?
From NEWS o Command-line completion has been moved from package 'rcompgen' to package 'utils': the former no longer exists as a separate package in the R distribution. It was always intended that it be merged into utils when finished and stable (and it helps that Deepayan in a member of R-core now). On Mon, 18 Feb 2008, James MacDonald wrote: I just built R-devel from source on OS X (Tiger), using the subversion sources. Running ./tools/rsync-recommended didn't download rcompgen. I checked http://cran.r-project/src/contrib/2.7.0/Recommended and indeed, this package is not there. If I try to install using install.packages I get install.packages(rcompgen, type=source) --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ... done trying URL 'http://cran.fhcrc.org/src/contrib/rcompgen_0.1-17.tar.gz' Content type 'application/x-gzip' length 29240 bytes (28 Kb) opened URL == downloaded 28 Kb * Installing *source* package 'rcompgen' ... Error: Invalid DESCRIPTION file Invalid Priority field. Packages with priorities 'base' or 'recommended' or 'defunct-base' must already be known to R. See the information on DESCRIPTION files in section 'Creating R packages' of the 'Writing R Extensions' manual. Execution halted ERROR: installing package DESCRIPTION failed ** Removing '/Users/jmacdon/R-devel/library/rcompgen' The downloaded packages are in /private/tmp/Rtmpb0Refs/downloaded_packages Updating HTML index of packages in '.Library' Warning message: In install.packages(rcompgen, type = source) : installation of package 'rcompgen' had non-zero exit status I assume I am missing something obvious, but don't know what it is. Any pointers? Best, Jim sessionInfo() R version 2.7.0 Under development (unstable) (2008-02-18 r44516) i386-apple-darwin8.11.1 locale: C attached base packages: [1] stats graphics grDevices datasets utils methods base loaded via a namespace (and not attached): [1] tcltk_2.7.0 tools_2.7.0 -- James W. MacDonald, MS Biostatistician UMCCC cDNA and Affymetrix Core University of Michigan 1500 E Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- 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