Re: [Rd] R 2.5.0 devel try issue in conjuntion with S4 method dispatch
Hi Seth, >It isn't S4 specific. The issue seems more about anonymous >calls/functions. > > ll = list() > ll[[1]] = function(x) stop("died") > > v = try(do.call(ll[[1]], list(1)), silent=TRUE) > Error in as.list(call)[[1]] == "doTryCatch" : > comparison (1) is possible only for atomic and list types > > v > Error: object "v" not found >I don't fully understand why the call is being computed, but the >following seems to get things going. > >+ seth I applied your patch and the issues seems to be resolved. Now I just wait to see if all test case failures related to this disappear. Thank you for your kind help! Matthias -- Matthias Burger Project Manager/ Biostatistician Epigenomics AGKleine Praesidentenstr. 110178 Berlin, Germany phone:+49-30-24345-371 fax:+49-30-24345-555 http://www.epigenomics.com [EMAIL PROTECTED] -- Epigenomics AG Berlin Amtsgericht Charlottenburg HRB 75861 Vorstand: Geert Nygaard (CEO/Vorsitzender), Dr. Kurt Berlin (CSO) Oliver Schacht PhD (CFO), Christian Piepenbrock (COO) Aufsichtsrat: Prof. Dr. Dr. hc. Rolf Krebs (Chairman/Vorsitzender) __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R 2.5.0 devel try issue in conjuntion with S4 method dispatch
Matthias Burger wrote: > Hi Seth, > > I applied your patch and the issues seems to be resolved. Now I just wait > to see if all test case failures related to this disappear. > > Thank you for your kind help! > > Matthias > I have just committed my variation of Seth's patch, so please check the current r-devel too. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Periods in package names?
On Mon, 5 Mar 2007, Henrik Bengtsson wrote: > Hi, > > is it ok to have more than one period in a package name, e.g. > aroma.light.bioc? > > I remember there was once a limitation/a recommendation that one > should use at most one period in a package name. I just browsed > "Writing R Extensions" (for R v2.4.1) and scanned it for words > "period" and "dot", and I cannot find this limitation anymore, but > only: It was dropped a while back: from src/gnuwin32/CHANGES for 2.3.0 The restriction on the number of dots in a package name (which stemmed from an undocumented restriction in ld.exe) has been worked around. > "The Package and Version fields give the name and the version of the > package, respectively. The name should consist of letters, numbers, > and the dot character and start with a letter. [...]" -- 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] Support for noarch packages in /usr/share/R/library
There is nothing in the R definition of a package to indicate if it is architecture-specific or not. Further, one version of a package might be, but an updated version might not (as has just happened with 'ifa'). Thus there are currently no 'noarch' R packages. [For those who miss the subtleties, the installed versions of both the R files and the help files may depend on the OS, as could in principle the data files. You need to read every file to find out. This is not just about whether there is arch-specific compiled code.] On Tue, 13 Mar 2007, Tom 'spot' Callaway wrote: > As originally raised here: > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=231220 > > It has been proposed that R should support noarch packages > in /usr/share/R/library in addition to architecture specific packages > in /usr/lib/R/library or /usr/lib64/R/library. R supports libraries anywhere specified by the users, and this can be specified at site level. So this seems to be a non-issue: R always has supported packages in /usr/share/R/library. > For example, the mAr addon doesn't have any architecture specific bits. > Strictly speaking, the Filesystem Hierarchy Standard says it doesn't > belong in /usr/lib, but rather, /usr/share. I don't read it as saying so, but it is so badly written that it is subject to many interpretations. > Ideas on the best way to resolve this would be greatly appreciated. It really only seems to occur if people want to re-package R packages as RPMs and use a single file system for multiple architectures. For those (rare) people, setting the default libraries in (say) R_HOME/etc/Renviron.site seems a complete solution. We could add ${sharedir}/R/library to the default .libPaths(), but it does not seem worth adding something that would not be tested regularly and can so easily be done by the end user. -- 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] Wishlist: Make screeplot() a generic (PR#9541)
Dear List Having not received any comments for or against my proposal to make screeplot() a generic function, I found some time to make the relevant changes to the svn trunk repository (revision 40848). Please find attached a patch against the R svn trunk sources including changes to the relevant help files and NAMESPACE. This builds and passes make check-devel out of the box on my FC4 machine. I took the option of making the default method for screeplot the existing function and the plot methods for princomp and prcomp both call screeplot.default directly. This, I hope, preserves the current behaviour and should be backwards compatible with code/packages/examples/docs that use these functions. One alternative would be to have explicit methods for classes "prcomp" and "princomp" that extract the relevant variances and pass on to screeplot.default for plotting. If this is preferred I can provide a patch for this scenario for consideration? All the best, Gav On Fri, 2007-03-02 at 17:53 +0100, [EMAIL PROTECTED] wrote: > Full_Name: Gavin Simpson > Version: 2.5.0 > OS: Linux (FC5) > Submission from: (NULL) (128.40.33.76) > > > Screeplots are a common plot-type used to interpret the results of various > ordination methods and other techniques. A number of packages include > ordination > techniques not included in a standard R installation. screeplot() works for > princomp and prcomp objects, but not for these other techniques as it was not > designed to do so. The current situation means, for example, that I have > called > a function Screeplot() in one of my packages, but it would be easier for users > if they only had to remember to use screeplot() to generate a screeplot. > > I would like to request that screeplot be made generic and methods for prcomp > and princomp added to R devel. This way, package authors can provide screeplot > methods for their functions as appropriate. > > I have taken a look at the sources for R devel (from the SVN repository) in > file > princomp-add.R and prcomp.R and it looks a relatively simple change to make > screeplot generic. > > I would be happy to provide patches and documentation if R Core were > interested > in making this change - I haven't done this yet as I don't want to spend time > doing something that might not be acceptable to R core in general. > > Many thanks, > > G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Gavin Simpson [t] +44 (0)20 7679 0522 ECRC [f] +44 (0)20 7679 0565 UCL Department of Geography Pearson Building [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street London, UK[w] http://www.ucl.ac.uk/~ucfagls/ WC1E 6BT [w] http://www.freshwaters.org.uk/ %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Index: /home/gavin/R/devel/src/library/stats/NAMESPACE === --- /home/gavin/R/devel/src/library/stats/NAMESPACE (revision 40848) +++ /home/gavin/R/devel/src/library/stats/NAMESPACE (working copy) @@ -388,6 +388,7 @@ S3method(print, summary.princomp) S3method(reorder, dendrogram) S3method(rev, dendrogram) +S3method(screeplot, default) S3method(str, dendrogram) S3method(summary, prcomp) S3method(summary, princomp) Index: /home/gavin/R/devel/src/library/stats/R/prcomp.R === --- /home/gavin/R/devel/src/library/stats/R/prcomp.R (revision 40848) +++ /home/gavin/R/devel/src/library/stats/R/prcomp.R (working copy) @@ -60,7 +60,7 @@ } plot.prcomp <- function(x, main = deparse(substitute(x)), ...) -screeplot(x, main = main, ...) +screeplot.default(x, main = main, ...) print.prcomp <- function(x, print.x = FALSE, ...) { cat("Standard deviations:\n") Index: /home/gavin/R/devel/src/library/stats/R/princomp-add.R === --- /home/gavin/R/devel/src/library/stats/R/princomp-add.R (revision 40848) +++ /home/gavin/R/devel/src/library/stats/R/princomp-add.R (working copy) @@ -46,9 +46,11 @@ } plot.princomp <- function(x, main = deparse(substitute(x)), ...) -screeplot(x, main = main, ...) + screeplot.default(x, main = main, ...) -screeplot <- +screeplot <- function(x, ...) UseMethod("screeplot") + +screeplot.default <- function(x, npcs = min(10, length(x$sdev)), type = c("barplot", "lines"), main = deparse(substitute(x)), ...) Index: /home/gavin/R/devel/src/library/stats/man/screeplot.Rd === --- /home/gavin/R/devel/src/library/stats/man/screeplot.Rd (revision 40848) +++ /home/gavin/R/devel/src/library/stats/man/screeplot.Rd (working copy) @@ -1,22 +1,23 @@ \name{screeplot} \alias{screeplot} -\title{Screeplot of PCA Results} +\alias{screeplot.default} +\title{Screeplots} \usage{ -screeplot(x, n
Re: [Rd] R 2.5.0 devel try issue in conjuntion with S4 method dispatch
Peter Dalgaard <[EMAIL PROTECTED]> writes: > I have just committed my variation of Seth's patch, so please check the > current r-devel too. Thanks, Peter. And I agree that your variation is cleaner. -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Wishlist: Make screeplot() a generic (PR#9541)
> "GS" == Gavin Simpson <[EMAIL PROTECTED]> > on Sat, 17 Mar 2007 13:02:29 + writes: GS> Dear List GS> Having not received any comments for or against my proposal to make GS> screeplot() a generic function, I found some time to make the relevant GS> changes to the svn trunk repository (revision 40848). GS> Please find attached a patch against the R svn trunk sources including GS> changes to the relevant help files and NAMESPACE. This builds and passes GS> make check-devel out of the box on my FC4 machine. also for me; thank you Gavin! GS> I took the option of making the default method for screeplot the GS> existing function and the plot methods for princomp and prcomp both call GS> screeplot.default directly. This, I hope, preserves the current GS> behaviour and should be backwards compatible with GS> code/packages/examples/docs that use these functions. [[it is still a matter of taste if screeplot.default should be called explicitly, but since this is in the same namespace, it works nicely and slightly more efficiently]] I have committed your patches (+ a NEWS entry) as is, to be there early enough before beta stage. GS> One alternative would be to have explicit methods for classes "prcomp" GS> and "princomp" that extract the relevant variances and pass on to GS> screeplot.default for plotting. If this is preferred I can provide a GS> patch for this scenario for consideration? I'd prefer it in general, but not in this case where the plot.* method for these already use screeplot(); still another matter of taste. Thanks for your contribution. Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] eigen returns NAs from a real matrix
Hi, All: Attached please find a symmetric, indefinite matrix for which 'eigen(...)$vectors' included NAs: > load("eigenBug.Rdata") > sum(is.na(eigen(eigenBug)$vectors)) [1] 5670 > sessioninfo() Error: could not find function "sessioninfo" > sessionInfo() R version 2.4.1 (2006-12-18) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" [7] "base" Using EISPACK does NOT return NAs: > sum(is.na(eigen(eigenBug, EISPACK=TRUE)$vectors)) [1] 0 I traced the problem to the following line in 'eigen': z <- if (!complex.x) .Call("La_rs", x, only.values, PACKAGE = "base") Comments? Best Wishes, Spencer Graves __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] eigen returns NAs from a real matrix
On Sat, 17 Mar 2007, Spencer Graves wrote: > Hi, All: > Attached please find a symmetric, indefinite matrix for which > 'eigen(...)$vectors' included NAs: >> load("eigenBug.Rdata") >> sum(is.na(eigen(eigenBug)$vectors)) > [1] 5670 >> sessioninfo() > Error: could not find function "sessioninfo" >> sessionInfo() > R version 2.4.1 (2006-12-18) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United > States.1252;LC_MONETARY=English_United > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 > > attached base packages: > [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" [7] > "base" > Using EISPACK does NOT return NAs: > sum(is.na(eigen(eigenBug, > EISPACK=TRUE)$vectors)) > [1] 0 > > > I traced the problem to the following line in 'eigen': > z <- if (!complex.x) > .Call("La_rs", x, only.values, PACKAGE = "base") > > > Comments? Nothing appeared as an attachment. -- 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