Re: [Rd] full copy on assignment?

2010-04-04 Thread Martin Morgan
is local. Then the duplicated version has only one reference and the primitive replacement doesn't copy it. ... __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred

Re: [Rd] S4 method defined but not used

2010-05-22 Thread Martin Morgan
for this issue. Thanks in advance for your time. Best regards, Thibaut Jombart. -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793

Re: [Rd] format: different S4 behavior in a package

2010-06-23 Thread Martin Morgan
. Any guidance would be appreciated. Thank you Dan Murphy [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson

Re: [Rd] how to define method for + function in a new class

2010-07-07 Thread Martin Morgan
Laboratory (MPL) Diamond Light Source Ltd Diamond House Harewell Science and Innovation Campus Chilton, Didcot Oxfordshire OX11 0DE Email: james.fo...@diamond.ac.uk Alt Email: j.fo...@imperial.ac.uk -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100

Re: [Rd] Telling Windows how to find DLL's from R?

2010-07-09 Thread Martin Morgan
[[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Re: [Rd] Severe memory problem using split()

2010-07-12 Thread Martin Morgan
mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793 __ R

Re: [Rd] Severe memory problem using split()

2010-07-12 Thread Martin Morgan
? Best regards Christian On 7/12/10 11:44 PM, Martin Morgan wrote: On 07/12/2010 01:45 PM, cstrato wrote: Dear all, With great interest I followed the discussion: https://stat.ethz.ch/pipermail/r-devel/2010-July/057901.html since I have currently a similar problem: In a new R session

Re: [Rd] Precompiled vignette on CRAN

2010-07-14 Thread Martin Morgan
tests. This gives a warning, as you will see in quite a few CRAN package checks. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research

Re: [Rd] Very slow subsetting by name

2010-07-15 Thread Martin Morgan
wondering why this subsetting by name is so slow since it seems it could be implemented with x4[match(keys, names(x4))], which is very fast: only 0.012s! This is with R-2.11.0 and R-2.12.0. Thanks, H. -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100

Re: [Rd] Very slow subsetting by name

2010-07-15 Thread Martin Morgan
On 07/15/2010 08:38 AM, Martin Morgan wrote: On 07/15/2010 01:12 AM, Hervé Pagès wrote: Hi, I'm subsetting a named vector using character indices. My vector of indices (or keys) is 10x longer than the vector I'm subsetting. All my keys are distinct and only 10% of them are valid (i.e. match

Re: [Rd] Weird erratic error and illogical error message, could someone explain this?

2010-09-03 Thread Martin Morgan
On 09/03/2010 04:42 AM, Duncan Murdoch wrote: Philippe Grosjean wrote: Hello, It's several days I try to track this bug, and even cannot cook a reproducible example. Yet, it occurs consistently in a long-running task after a variable period of time. Here is an example: I would look

[Rd] Sexpr in package.Rd fails

2010-09-06 Thread Martin Morgan
If I f = function() {} package.skeleton(PkgA, f, path=/tmp) and then edit man/PkgA-pacakge.Rd to read in part \description{ More about what it does (maybe more than one line) \Sexpr{1} } and then R CMD build PkgA I end up with Saving output to ‘/tmp/PkgA/build/PkgA.pdf’ ... Warning in

Re: [Rd] Dispatch method on S3 or S4 class

2010-09-07 Thread Martin Morgan
On 09/06/2010 10:00 PM, Dario Strbenac wrote: Hello, I've been attempting to make a generic method that dispatches on the first argument, which can be either an S3 or an S4 class. This is as far as I've gotten. Any suggestions about what to try next ? library(aroma.affymetrix)

Re: [Rd] Recursion error after upgrade to R_2.11.1 [Sec=Unclassified]

2010-10-06 Thread Martin Morgan
On 10/06/2010 06:12 PM, Troy Robertson wrote: Hi all, After no replies to my previous message I thought I might show some code to demonstrate the change and again seek any explanation for the error now thrown by my code after upgrading from 2.10.1 to 2.11.1. Thanks Troy

Re: [Rd] R 2.12.0 alpha/beta/rc warning: spurious or not?

2010-10-08 Thread Martin Morgan
On 10/08/2010 01:25 PM, Dirk Eddelbuettel wrote: With several versions of R 2.12.0 I have been seeing this when running R CMD build Rcpp from the SVN sources: [...] Transcript written on Rd2.log. Saving output to '/home/edd/svn/rcpp/pkg/Rcpp/build/Rcpp.pdf' ... Warning in

Re: [Rd] data set mube S4 class to be submitted to Bioconductor

2010-10-12 Thread Martin Morgan
On 10/12/2010 07:38 AM, lan gao wrote: Dear R Developers, I am developing a package to submit to bioconductor. Right now, a gene-set sample data is saved as a data frame. Each row contains a probe set and its corresponding gene-set name ( mutiple probe -set may map to a gene-set name) .

Re: [Rd] library verbose option doesn't stop Loading required package XYZ

2010-10-20 Thread Martin Morgan
On 10/20/2010 04:25 PM, Dominick Samperi wrote: Thanks David, but this doesn't work. Under R 2.12.0 the Loading required packages messages appear under R 2.12.0 when I use, for example: Rscript --vanilla -e { invisible(library(cxxPack)); cat(sqrt(2)) } ?suppressPackageStartupMessages

[Rd] R-devel CMD build fails when vignette present

2010-10-24 Thread Martin Morgan
If I try to build a package with a vignette R CMD build Biobase I see * checking for file 'Biobase/DESCRIPTION' ... OK * preparing 'Biobase': * checking DESCRIPTION meta-information ... OK * cleaning src * installing the package to re-build vignettes * creating vignettes ... OK * cleaning src

Re: [Rd] R-devel CMD build fails when vignette present

2010-10-25 Thread Martin Morgan
On 10/25/2010 03:21 AM, Prof Brian Ripley wrote: Biobase is not self-contained so I cannot easily test it, but as far as I know this is now resolved. Thank you it is. Martin On Sun, 24 Oct 2010, Martin Morgan wrote: If I try to build a package with a vignette R CMD build Biobase I

Re: [Rd] S4 methods for rbind()

2010-10-26 Thread Martin Morgan
On 10/26/2010 03:53 AM, Robin Hankin wrote: Hello. I am trying to write an S4 method for rbind(). I have a class of objects called 'mdm', and I want to be able to rbind() them to one another. I do not want the method for rbind() to coerce anything to an mdm object. I want

Re: [Rd] SEXPs and slots

2010-11-12 Thread Martin Morgan
On 11/12/2010 02:31 PM, Patrick Leyshock wrote: Hello, I've created this class: setClass(example, representation ( size = numeric, id= character ) ) Suppose I create a new instance of this class: x - new(example, 4, id_value) This creates an S4

Re: [Rd] SEXPs and slots

2010-11-15 Thread Martin Morgan
covered... I guess my opinion is that Rcpp would not be useful for understanding R's C layer, whatever its merits for 'getting the job done'. Martin Thank you, Patrick On Fri, Nov 12, 2010 at 4:36 PM, Martin Morgan mtmor...@fhcrc.org mailto:mtmor...@fhcrc.org wrote: On 11/12/2010

Re: [Rd] Trying to understand the search path and namespaces

2010-11-15 Thread Martin Morgan
On 11/15/2010 04:56 PM, Hadley Wickham wrote: Well, that's what I thought too. But: parents - function(x) { if (identical(x, emptyenv())) return() c(environmentName(x), parents(parent.env(x))) } parents(as.environment(package:devtools)) [1] package:devtools package:methods Autoloads

Re: [Rd] S4 setMethod, setGeneric and default arguments

2010-11-22 Thread Martin Morgan
On 11/22/2010 03:23 AM, evilphil wrote: BUMP anyone? Hi evilphil -- Your method signature doesn't have 'missing' for its third argument, and hence isn't the target of dispatch when the generic is invoked with a missing argument. I guess you'd figured that out and are really asking whether

Re: [Rd] setGeneric for residuals, etc

2011-01-24 Thread Martin Morgan
On 01/24/2011 08:37 AM, Kasper Daniel Hansen wrote: Johann, whether S4 is better than S3 is a heated subject. No-one (I think) disputes that S4 is in some sense more flexible (for some suitable definition of flexible), but it does incur some performance overhead (how much is debatable) and

Re: [Rd] Dealing with R list objects in C/C++

2011-01-26 Thread Martin Morgan
On 01/26/2011 02:56 PM, wayne.zh...@barclayscapital.com wrote: Hi, I'd like to construct an R list object in C++, fill it with relevant data, and pass it to an R function which will return a different list object back. I have browsed through all the R manuals, and examples under

Re: [Rd] Dealing with R list objects in C/C++

2011-01-27 Thread Martin Morgan
at the moment, so I prefer not to bring in Rinside/Rcpp if possible. Thanks again, Wayne -Original Message- From: Martin Morgan [mailto:mtmor...@fhcrc.org] Sent: Wednesday, January 26, 2011 10:04 PM To: Zhang, Wayne: IT (NYK) Cc: r-devel@r-project.org Subject: Re: [Rd] Dealing with R

Re: [Rd] help with S4 objects: trying to use a link-glm as a class in an object definition

2011-01-28 Thread Martin Morgan
On 01/27/2011 08:51 PM, Paul Bailey wrote: Hi, I'm trying to make a new S4 object with a slot for a link-glm object. R doesn't like me have a slot of class link-glm class(make.link(probit)) [1] link-glm Tell the S4 system that you'd like to use this 'old' class setOldClass(link-glm)

Re: [Rd] S3 method for S4 object

2011-02-03 Thread Martin Morgan
On 02/03/2011 09:29 AM, Paul Gilbert wrote: I am trying to extend an S3 method to work with an S4 object as well as the S3 objects it works with, but UseMethod does not seem to recognize the S4 class and dispatches to the default method. Is this to be expected or should I be looking for an

Re: [Rd] S4 problems

2011-02-15 Thread Martin Morgan
On 02/14/2011 11:54 PM, robin hankin wrote: Hello everybody [R-2.12.1] I am having difficulty dealing with Oarray objects. I have a generic function, call it foo(), and I wish to define a method for Oarray objects. I do not have or want a method for regular arrays [actually, I want

Re: [Rd] changes in recent R-devel revisions?

2011-03-01 Thread Martin Morgan
On 03/01/2011 03:19 PM, Benilton Carvalho wrote: Hi, I have a BioC infra-structure package that works fine (I can build, check and load it successfully) on revision r53950. The very same package fails on r54591 with the error below: Error in loadNamespace(package, c(which.lib.loc,

Re: [Rd] Problem with defining new method for residuals()

2011-03-10 Thread Martin Morgan
On 03/10/2011 08:21 AM, ONKELINX, Thierry wrote: Dear all, I'm writing a package and I would like to reuse the residuals() function. When I use a function which calls the redefined residuals (for my custom class) I get an error (see below). It looks like the wrong method is used. The

Re: [Rd] Using missing() in a S4 method with extra arguments

2011-03-11 Thread Martin Morgan
On 03/11/2011 02:07 AM, Andreas Borg wrote: Hi all, I have a function which makes use of missing() to determine which arguments are provided in the call - basically, there are two sets of arguments that map to different strategies the function uses to fulfill its task. After conversion to

Re: [Rd] R_HOME path getting munged in inst/doc/Makefile on Windows

2011-03-21 Thread Martin Morgan
On 03/21/2011 07:22 PM, Simon Urbanek wrote: On Mar 21, 2011, at 9:07 PM, Dan Tenenbaum wrote: Hello, I have come across two separate packages that have a Makefile in inst/doc which use the R_HOME variable. In both cases, the path to R_HOME gets munged in such a way that commands that

Re: [Rd] another import puzzle

2011-03-26 Thread Martin Morgan
to Import: Matrix and importFrom(Matrix, summary). Martin Morgan exportMethods(coef,summary,show,print) exportClasses(mer,summary.mer) S3method(coeftab,default) The package passes the routine parts of R CMD check. The following test shows that, with lme4 loaded, coef(summary([object of class

[Rd] R-2-13-alpha invalid subscript when checking for unstated dependencies

2011-03-27 Thread Martin Morgan
R version 2.13.0 alpha (2011-03-27 r55091) This error occurs when R CMD check'ing a Bioconductor package: * checking for unstated dependencies in R code ... WARNING Error in e[keep] : invalid subscript type 'list' Execution halted See the information on DESCRIPTION files in the chapter

Re: [Rd] Problem with dyn.load in R 2.13.0

2011-04-13 Thread Martin Morgan
On 04/13/2011 11:34 AM, Dirk Eddelbuettel wrote: On 13 April 2011 at 13:00, Terry Therneau wrote: | I have a test directory for the survival suite, and dyn.load has ceased | to work in it. Below shows the log: | | tmt1075% R --vanilla | | R version 2.12.2 (2011-02-25) | Copyright (C) 2011 The

Re: [Rd] DESCRIPTION file and Rd examples

2011-04-15 Thread Martin Morgan
On 04/15/2011 11:18 AM, Simon Urbanek wrote: On Apr 14, 2011, at 11:00 PM, Dario Strbenac wrote: I have a confusing error from R CMD check that I don't get when running the example manually by hand. In the \examples section of an Rd file, I create a GRanges object, then I call a function

Re: [Rd] Package Name Not Found Warning

2011-04-19 Thread Martin Morgan
On 04/19/2011 05:00 PM, Dario Strbenac wrote: Hello, I've got a DESCRIPTION file with a the first line: Package: Repitools But, when I run R CMD INSTALL Repitools I get: * installing *source* package Repitools ... ** R ** data ** inst ** preparing package for lazy loading Warning in

Re: [Rd] Package Name Not Found Warning

2011-04-19 Thread Martin Morgan
On 04/19/2011 08:00 PM, Dario Strbenac wrote: Ah, I think it's happening because I have setOldClass(AffymetrixCelSet) in my package. if AffymetrixCelSet is from aroma.affymetrix, then the line above results in setOldClass(AffymetrixCelSet) Error in x[length(x):1L] : object of type 'closure'

[Rd] Make as.factor an S3 generic?

2011-04-20 Thread Martin Morgan
as.factor / as.ordered is not written as a generic. This differs from as.numeric, as.matrix, and other as.*. The following seems to address this and does not break make check-all. FWIW, the patch is against r55563, because with r55564 I see /home/mtmorgan/src/R-devel/src/main/dounzip.c:75:15:

Re: [Rd] Make as.factor an S3 generic?

2011-04-20 Thread Martin Morgan
On 04/20/2011 10:13 AM, William Dunlap wrote: -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of Martin Morgan Sent: Wednesday, April 20, 2011 9:56 AM To: R-devel@r-project.org Subject: [Rd] Make as.factor an S3 generic? as.factor

Re: [Rd] Make as.factor an S3 generic?

2011-04-20 Thread Martin Morgan
of as.numeric.A) until factor. Martin On Wed, 20 Apr 2011, Martin Morgan wrote: as.factor / as.ordered is not written as a generic. This differs from as.numeric, as.matrix, and other as.*. The following seems to address this and does not break make check-all. FWIW, the patch is against r55563

Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Martin Morgan
)) in an example on a man page is much preferred to \dontrun{}, as Simon mentions. Martin Morgan For more info: this is covered in the Writing R Extensions, but is also described here: http://stackoverflow.com/questions/1454211/what-does-not-run-mean-in-r-help-pages HTH, -steve -- Steve

[Rd] Windows Rzlib.dll gzopen and friends

2011-04-29 Thread Martin Morgan
Several Bioconductor packages were expecting Windows Rzlib.dll to provide gzopen / gzread / gzseek / gzgets / gzrewind / gzclose. Are these gone for good, viz., r55624 ? Martin -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Re: [Rd] Reference Classes: Accessing methods via [[...]], bug?

2011-05-01 Thread Martin Morgan
On 05/01/2011 03:09 PM, John Chambers wrote: Yes, as presented on that site it makes a little more sense: While experimenting with the new reference classes in R I noticed some odd behaviour if you use the [[ ]] notation for methods (X[[doSomething]] instead of X$doSomething). This notation

Re: [Rd] Windows Rzlib.dll gzopen and friends

2011-05-06 Thread Martin Morgan
This change has significant consequences for Windows packages using R's zlib, including packages providing core Bioconductor functionality. Are the changes in r55624 meant to be long-term? Martin On 04/29/2011 03:13 PM, Martin Morgan wrote: Several Bioconductor packages were expecting

[Rd] Devel version of R CMD build may create packages with incomplete doc/ directories

2011-05-08 Thread Martin Morgan
An .Rnw file in the vignettes/ directory might reasonably \usepackage or \include .sty, .bib, or other (e.g., image) files in the same directory or a sub-directory. The .Rnw file is copied to inst/doc and hence installed, but the additional files are not. This means that the installed .Rnw

Re: [Rd] Windows Rzlib.dll gzopen and friends

2011-05-17 Thread Martin Morgan
it also seems like a poor choice. What other strategies are recommended? Martin On 05/06/2011 09:58 AM, Martin Morgan wrote: This change has significant consequences for Windows packages using R's zlib, including packages providing core Bioconductor functionality. Are the changes in r55624 meant

Re: [Rd] Reference Classes/S4 Classes: can method dispatch check superclasses BEFORE resorting to method for ANY?

2011-05-27 Thread Martin Morgan
On 05/27/2011 06:13 AM, Janko Thyson wrote: Dear list, is it possible that method dispatch checks for superclasses/virtual classes before checking ANY? I'd like to build a generic initialization method for all my Reference Class (say MyDataFrame) objects by having them inherit from class, say

Re: [Rd] Query super- and subclasses of a class: is there a better way than to use 'completeClassDefinition()'

2011-05-31 Thread Martin Morgan
On 05/30/2011 08:54 AM, Janko Thyson wrote: Dear List, when I first started to use S4 classes, I used the function 'completeClassDef()' in order to see the super- and subclasses of a certain class: Hi Janko -- I think 'complete' is meant as an adverb here; what you might want is

Re: [Rd] S4 Slot assignment within function

2011-06-04 Thread Martin Morgan
On 06/03/2011 02:03 PM, mcguirebc wrote: Is there a simple way to assign values to S4 slots from within a function? Doing this doesn't work: assign_slot-function(x){ assign(OBJECT@slot,x,envir=parent.env(environment()) } assign_slot(x) All I get from this is a new object with the name

Re: [Rd] S4 class, passing argument names to function, modify original

2011-06-04 Thread Martin Morgan
On 06/04/2011 03:07 AM, soeren.vo...@uzh.ch wrote: Hello, an S4 class Foo is defined with a setter, $. For several reasons, the setter calls a function, .foo.update(). However, bypassing the argument names of the setter does not work. Question 1: Why not and how can I fix this? Question 2:

Re: [Rd] Reference Class error message: may be caused by lazy evaluation?

2011-06-09 Thread Martin Morgan
On 06/09/2011 10:11 AM, John Chambers wrote: Good catch. Here's the problem. To save space and time, reference methods are not all copied to every object in the class. Instead, the methods are copied in when first accessed. Methods are functions which use the object as their environment. So

Re: [Rd] CRAN package with dependencies on Bioconductor

2011-06-10 Thread Martin Morgan
On 06/10/2011 04:04 PM, Kornelius Rohmeyer wrote: I'm sorry for sending a wrongly formated mail before. This is the missing text: Dear all, for a CRAN-package that depends on another Bioconductor-package I find two things annoying and would like to know whether there are some workarounds: 1)

Re: [Rd] CRAN package with dependencies on Bioconductor

2011-06-10 Thread Martin Morgan
On 06/10/2011 05:46 PM, Kornelius Rohmeyer wrote: Dear Martin, thanks for your response. The superclass graphBase is introduced in graph 1.30. In my understanding the problem is that our package gMCP is build on CRAN for R 2.12 with the package graph in version 1.30. Unfortunately biocLite

Re: [Rd] Recent and upcoming changes to R-devel

2011-07-04 Thread Martin Morgan
On 07/04/2011 05:08 AM, Prof Brian Ripley wrote: There was an R-core meeting the week before last, and various planned changes will appear in R-devel over the next few weeks. These are changes planned for R 2.14.0 scheduled for Oct 31. As we are sick of people referring to R-devel as '2.14' or

[Rd] requiring NAMESPACE re-installation marked as old.packages?

2011-07-19 Thread Martin Morgan
It would be convenient if, under R-devel r56422, packages that require re-installation because they do not have a NAMESPACE were marked as old.packages, so their lack of functionality can be discovered more easily. snow %in% row.names(old.packages()) [1] FALSE library(snow) Error in

[Rd] reg.finalizer and connection gc -- which runs when (and why)?

2011-07-21 Thread Martin Morgan
With this set-up options(warn = 1) tf - tempfile() finalizer - function(obj) { message(finalizer) close(obj$f) } this code works ev - new.env() ev$f - file(tf, w) reg.finalizer(ev, finalizer) rm(ev) gc() whereas this (reversing the order of file() and reg.finalizer()) ev - new.env()

Re: [Rd] Implementing a plugin paradigm with R methods

2011-08-23 Thread Martin Morgan
On 08/23/2011 03:02 PM, Janko Thyson wrote: Dear list, I was wondering how to best implement some sort of a plugin paradigm using R methods and the dispatcher: Say we have a function/method ('foo') that does something useful, but that should be open for extension in ONE specific area by OTHERS

Re: [Rd] methods() not listing some S3 plot methods...?

2011-08-26 Thread Martin Morgan
On 08/26/2011 04:44 AM, Gavin Simpson wrote: Dear List, This may be related to this email thread initiated by Ben Bolker last month: https://stat.ethz.ch/pipermail/r-devel/2011-July/061630.html In answering this Question on StackOverflow http://stackoverflow.com/q/7195628/429846 I noticed that

Re: [Rd] How to safely using OpenMP pragma inside a .C() function?

2011-09-12 Thread Martin Morgan
On 08/29/2011 05:36 PM, Simon Urbanek wrote: On Aug 29, 2011, at 7:48 PM, Alireza Mahani wrote: I am trying to parallelize part of a C function that is called from R (via .C) using OpenMP's parallel for pragma. I get mixed results: some runs finish with no problem, but some lead to R crashing

Re: [Rd] cbind() crashes on raw vectors

2011-09-23 Thread Martin Morgan
On 09/23/2011 01:46 PM, Hervé Pagès wrote: Hi, cbind() doesn't seem to like raw vectors: df - cbind(a=integer(4000), b=raw(4000)) df *** glibc detected *** /home/hpages/R-2.13.1/bin/exec/R: malloc(): memory corruption: 0x02d73ca0 *** For what it's worth, under valgrind R -d

[Rd] WIndows Makeconf masks user-specified zlib.h

2011-09-24 Thread Martin Morgan
On windows under current R-devel (r57066), R CMD INSTALL, for instance, invokes gcc with -I$(R_HOME)/include prior to any user-defined include paths. This means that a package cannot specify an alternative zlib.h, as a (reduced) version of this is in $(R_HOME)/include. One way around this is

[Rd] Moderating consequences of garbage collection when in C

2011-10-04 Thread Martin Morgan
Allocating many small objects triggers numerous garbage collections as R grows its memory, seriously degrading performance. The specific use case is in creating a STRSXP of several 1,000,000's of elements of 60-100 characters each; a simplified illustration understating the effects (because

Re: [Rd] S4 helper functions: regular or generic?

2009-02-25 Thread Martin Morgan
language characteristics). Martin Thanks for sharing your insight and time, gopi. http://gopi-goswami.net/ __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson

[Rd] unlink fails to remove symbolic links

2009-03-21 Thread Martin Morgan
] tools_2.10.0 -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793 __ R-devel@r-project.org mailing list https

Re: [Rd] unlink fails to remove symbolic links

2009-03-21 Thread Martin Morgan
A little more precisely, unlink fails when the file being unlinked is a broken symbolic link (as in the example below). This is because R_FileExists checks stat() == 0, and stat fails (returns -1) when trying to resolve the broken link. Perhaps lstat() is more appropriate? Martin Martin Morgan

[Rd] Recent setClass fails where previous succeeded

2009-03-28 Thread Martin Morgan
. Martin -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793 __ R-devel@r-project.org mailing list https

Re: [Rd] what is the preferred method to create a package local variable?

2009-03-31 Thread Martin Morgan
missing? Thanks, Whit __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location

Re: [Rd] what is the preferred method to create a package local variable?

2009-03-31 Thread Martin Morgan
Stavros Macrakis wrote: On Tue, Mar 31, 2009 at 12:41 PM, Martin Morgan mtmor...@fhcrc.org mailto:mtmor...@fhcrc.org wrote: I don't konw about preferred, but one method is pkgVars - local({ x - NULL list(getX=function() x, setX=function(value) x - value

Re: [Rd] Sharing variables in seperate workspace

2009-04-21 Thread Martin Morgan
expect environment: bdplot from environment(). How can I get to write to .FOO via bar()? Thank you very much Philip. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred

Re: [Rd] S4 method dispatch and namespaces: why is default method selected

2009-05-18 Thread Martin Morgan
://www.fss.uu.nl/soc/bojanowski http://www.ifispan.waw.pl/socnierowno __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave

[Rd] install.packages now intentionally references .Rprofile?

2009-05-20 Thread Martin Morgan
;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 utils datasets methods base Martin -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024

Re: [Rd] S4 Objects [Sec=Unclassified]

2009-06-02 Thread Martin Morgan
Hi Troy -- Troy Robertson wrote: I am new to R programming but have dived into a medium sized modelling software development project. Having come from a Java OO background I have a couple of questions about S4 objects. Is there a way to make S4 slots (and methods) private and hence

Re: [Rd] Accessing an object from the function in its .Data slot?

2009-06-23 Thread Martin Morgan
Duncan Murdoch wrote: Martin Kober wrote: I have an S4 object extending function. Is it there a good way to access the object (resp. its slots) from within the function in .Data? I don't think so. That's not really the way the S4 object system is designed to work. If a function needs

Re: [Rd] V2.9.0 changes [Sec=Unclassified]

2009-06-23 Thread Martin Morgan
Troy Robertson wrote: Hi all, Prefix: I am a frustrated Java coder in R. ah good, if you're frustrated with Java you'll find R very different ;) I am coding a medium sized ecosystem modelling program in R. I have changed to using S4 objects and it has cost me an order of

Re: [Rd] R data inspection under gdb?

2009-06-25 Thread Martin Morgan
Hi Kynn -- (gdb) call Rf_PrintValue(x) 'void' is I think the return value of R_PV() Martin Kynn Jones wrote: Hi, everyone. I'm trying to debug an R-module, written in C, and I'm using gdb for this. How can I print standard R objects from within C code? BTW, I'm familiar with the

Re: [Rd] bug in Rf_PrintValue ?

2009-06-26 Thread Martin Morgan
Kynn Jones wrote: I'm very green with R, so maybe this is not a bug, but it looks like one to me. The following program segfaults at the second call to Rf_PrintValue(). To failure depends on the value of the y-string. E.g., if I change it from coverage to, say, COVERAGE, the segfault does

Re: [Rd] S4 and connection slot [Sec=Unclassified]

2009-06-29 Thread Martin Morgan
(parent=emptyenv())) { .Object - callNextMethod(.Object, .xData=.xData) return(.Object) } ) s - new(Element) Not sure why that changes things though? Troy -Original Message- From: Martin Morgan [mailto:mtmor...@fhcrc.org] Sent: Monday

Re: [Rd] S4 and connection slot [Sec=Unclassified]

2009-06-29 Thread Martin Morgan
Stavros Macrakis wrote: On Mon, Jun 29, 2009 at 9:19 AM, Martin Morgan mtmor...@fhcrc.org mailto:mtmor...@fhcrc.org wrote: ...I'm not sure that including a connection in a slot is going to be a good idea, though -- a connection has reference-like semantics, so you can end

Re: [Rd] V2.9.0 changes [Sec=Unclassified]

2009-07-02 Thread Martin Morgan
of having to hide them in .xData Troy Troy Robertson Database and Computing Support Provider Southern Ocean Ecosystems, ERM/Fish Australian Antarctic Division Channel Highway, Kingston 7050 PH: 03 62323571 troy.robert...@aad.gov.au -Original Message- From: Martin Morgan

[Rd] factor() calls sort.list unnecessarily?

2009-07-03 Thread Martin Morgan
R-devel, factor(x) can take a long time on large character vectors (more than a minute in the example below). This is because of a call to sort.list. str(x) chr [1:3436831] chr5 chr10 chr16 chr3 chr4 chr15 ... Rprof(/tmp/factor.Rprof) invisible(factor(x)) Rprof()

[Rd] tabulate can accept NA values?

2009-07-20 Thread Martin Morgan
NAOK=TRUE? This is useful in apply'ing tabulate to the rows or columns of a (large) matrix, where the work-around involves introducing some artificial NA value (and consequently copying the matrix) outside the range of tabulate's nbin argument. Martin -- Martin Morgan Computational Biology / Fred

Re: [Rd] RFC: methods() and showMethods() {was debug}

2009-07-30 Thread Martin Morgan
@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793

Re: [Rd] S4 Generics and NAMESPACE : justified warning ?

2009-08-18 Thread Martin Morgan
Yohan Chalabi wrote: Dear list, It seems that a package (pkgB) using another package (pkgA) with S4 generics formed by taking existing functions (for example 'plot') must not import the existing functions ('plot') in its namespace to avoid the warning replacing previous import: plot.

Re: [Rd] S4: inheritance of validity methods?

2009-08-18 Thread Martin Morgan
package, not your implementation of particular classes? Martin Many thanks, Vitalie. -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793

Re: [Rd] S4: inheritance of validity methods?

2009-08-18 Thread Martin Morgan
Vitalie S. wrote: On Tue, 18 Aug 2009 15:42:48 +0200, Martin Morgan mtmor...@fhcrc.org wrote: Vitalie S. vitosm...@rambler.ru writes: Dear Developers, In current implementation of validity method, objects are first coerced to superclass (slots are striped). Thus, it is not possible

Re: [Rd] package dependencies specification

2009-08-25 Thread Martin Morgan
Hi Christos -- Christos Hatzis wrote: Hello, After running R CMD check on my package I received the following error on package dependencies: * using log directory 'C:/z-zBackup/Nuvera Bio on Iatros01/Development/RPackages/nvNormalize/nvNormalize.Rcheck' * using R version 2.9.1

Re: [Rd] Clarifications please.

2009-08-26 Thread Martin Morgan
Thanks. I think I got the hang of it. I will try it out and post any more queries I have regarding handling data types onto the mailing list. Regards Abhijit Bera On Tue, Aug 25, 2009 at 7:15 PM, Martin Morgan mtmor...@fhcrc.org mailto:mtmor...@fhcrc.org wrote

Re: [Rd] Unexpected behaviour initializing S4 class

2009-09-01 Thread Martin Morgan
for b.initialize is used (not starting with k), everything is fine. Other workarounds: - in setMethod write kl = .Object instead of simply .Object yes, this avoids mixing matching by name and by position. Martin Morgan - this does not happen if the contents of b.initialize are directly moved

Re: [Rd] Suggestion: Allow packages to add additional information to sessionInfo()

2009-09-04 Thread Martin Morgan
. Please update your package and provide sessionInfo again' might well serve to address the user's original problem, but it would have been better to spot the outdated package by looking at the version number produced by sessionInfo(). Martin Morgan Best, Fritz

Re: [Rd] enabling core dumps

2009-09-04 Thread Martin Morgan
pleyd...@supagro.inra.fr wrote: Writing R Extensions says {quotes} If you have a crash which gives a core dump you can use something like gdb /path/to/R/bin/exec/R core.12345 to examine the core dump. If core dumps are disabled... {unquotes} sadly it doesn't go on to say how to

Re: [Rd] enabling core dumps

2009-09-04 Thread Martin Morgan
pleyd...@supagro.inra.fr wrote: not really answering your question, but I find it more useful to R -d gdb or R -d gdb -f test.R where test.R reproduces the bug in some minimal code. A variant is R -d valgrind -f test.R if the memory problem is not easy to spot. Thanks for your

Re: [Rd] importing/loading package without a namespace

2009-09-10 Thread Martin Morgan
Hi Christos -- Christos Hatzis wrote: I am developing a package that imports some functions from another package. The imported package (qcc) does not have a namespace and this is causing problems with loading of my package, which has a namespace. Is there a workaround to allow loading the

Re: [Rd] How do I access class slots from C?

2009-09-29 Thread Martin Morgan
list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793 __ R-devel

Re: [Rd] Dependency 'sma' is not available

2009-10-01 Thread Martin Morgan
-- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [Rd] mysteriously persistent generic definition

2009-10-22 Thread Martin Morgan
-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793

Re: [Rd] group generics

2009-11-25 Thread Martin Morgan
Thanks. Ross Boylan __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold

[Rd] how to catch useDynLib errors? Rgraphviz

2009-12-23 Thread Martin Morgan
success using library.dynam in .onLoad? Thanks in advacne Martin -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793

  1   2   3   4   5   6   7   8   9   10   >