[Rd] winMenuAdd

2005-11-22 Thread Martin Morgan
mit of 16 menus. The limit is reached in Bioconductor, as packages add vignettes. R version 2.2.0, 2005-11-21, i386-pc-mingw32 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] &

[Rd] Windows R CMD build leftovers

2005-11-24 Thread Martin Morgan
A command R CMD build that fails, e.g., because of C code compilation errors, leaves a directory %TMPDIR%/Rinst.xxx containing the file R.css. Although R CMD INSTALL --build cleans up after itself, build does not. A fix is below. Also, build.in references Rcmd.exe, which I thought was no longer

Re: [Rd] (not just!) Windows R CMD build leftovers

2005-12-01 Thread Martin Morgan
Utils.pm (revision 36565) +++ share/perl/R/Utils.pm (working copy) @@ -75,7 +75,7 @@ $pat . $$ . sprintf("%05d", rand(10**5))); my $n=0; -while(-f $retval){ +while(-e $retval){ $retval = file_path($R::Vars::TMPDIR,

Re: [Rd] can someone help me understand LAM/MPI and Rmpi for use on a cluster

2006-01-03 Thread Martin Morgan
Here's my slow response; if there were other off-list replies it would be great to have a summary. Not exactly sure what you're looking for. You might adopt a parallel program so that the 'master' node does something like myprog.c: MPI_Init(...) /* parallel computations, e.g., of pi */

Re: [Rd] prod(numeric(0)) surprise

2006-01-09 Thread Martin Morgan
>> Duncan Murdoch I would have expected numeric(0) as the result (numeric(0) is the result from log(numeric(0)), etc). Martin (Morgan) Martin Maechler <[EMAIL PROTECTED]> writes: >>>>>> "Ben" == Ben Bolker <[EMAIL PROTECTED]> >

Re: [Rd] prod(numeric(0)) surprise

2006-01-09 Thread Martin Morgan
mean x == numeric(0), n == 0 (0 copies of an empty set), x == ANY n == numeric(0) (an empty set of ANYthing), x == numeric(0), n == numeric(0) ? For all of these, x^n evaluates to numeric(0). Martin (Morgan) Duncan Murdoch <[EMAIL PROTECTED]> writes: > On 1/9/2006 12:40 PM, Martin Morg

Re: [Rd] prod(numeric(0)) surprise

2006-01-09 Thread Martin Morgan
meric(0) + 1 ==> numeric(0) >>> would give me pause. >>> Gabor Grothendieck <[EMAIL PROTECTED]> writes: >>> > The way to think about it is: >>> > >>> >prod(rep(x,n)) == x^n >>> > >>> > and that works for n=0 t

Re: [Rd] How to address the following: CRAN packages not using Suggests conditionally

2018-01-22 Thread Martin Morgan
table 'release' branch, once every six months. This means that the Bioconductor devel branch periodically (as recently and I suspect over the next several days) contains considerable carnage that propagates to CRAN devel builds, creating additional work for CRAN maintainers. Martin Morg

Re: [Rd] Why R should never move to git

2018-01-25 Thread Martin Morgan
tandard / best practice for merging branches git checkout master git merge ... a-pull-request git push ... Creating pull requests is a problem for the developer wanting to contribute to R, not for the R-core developer. As we've seen in this thread, R-core would not need to feel responsib

Re: [Rd] download.file does not process gz files correctly (truncates them?)

2018-05-03 Thread Martin Morgan
On 05/02/2018 03:21 PM, Joris Meys wrote: Dear all, I've noticed by trying to download gz files from here : https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSM907811 At the bottom one can download GSM907811.CEL.gz . If I download this manually and try oligo::read.celfiles("GSM907811.CEL.g

Re: [Rd] download.file does not process gz files correctly (truncates them?)

2018-05-03 Thread Martin Morgan
On 05/03/2018 05:48 AM, Joris Meys wrote: Dear all, I've been diving a bit deeper into this per request of Tomas Kalibra, and found the following : - the lock on the file is only after trying to read it using oligo, so that's not a R problem in itself. The problem is independent of extrenal pa

Re: [Rd] length of `...`

2018-05-03 Thread Martin Morgan
nargs() provides the number of arguments without evaluating them > f = function(x, ..., y) nargs() > f() [1] 0 > f(a=1, b=2) [1] 2 > f(1, a=1, b=2) [1] 3 > f(x=1, a=1, b=2) [1] 3 > f(stop()) [1] 1 On 05/03/2018 11:01 AM, William Dunlap via R-devel wrote: In R-3.5.0 you can use ...length():

Re: [Rd] Compiler + stopifnot bug

2019-01-03 Thread Martin Morgan
vis builds of Bioconductor packages https://stat.ethz.ch/pipermail/bioc-devel/2019-January/014506.html and elsewhere Martin Morgan On 1/3/19, 7:05 PM, "R-devel on behalf of Duncan Murdoch" wrote: On 03/01/2019 3:37 p.m., Duncan Murdoch wrote: > I see this too; by bisection, it see

Re: [Rd] defining r audio connections

2020-05-06 Thread Martin Morgan
g the version of the API, as advised in the header file!) Martin Morgan On 5/6/20, 2:26 PM, "R-devel on behalf of Duncan Murdoch" wrote: On 06/05/2020 1:09 p.m., frede...@ofb.net wrote: > Dear R Devel, > > Since Linux moved away from using a file-system interfac

Re: [Rd] defining r audio connections

2020-05-06 Thread Martin Morgan
ages I personally would implement a connection. (I mistakenly thought this was a more specialized mailing list; I wouldn't have posted to R-devel on this topic otherwise) Martin Morgan On 5/6/20, 4:12 PM, "Gábor Csárdi" wrote: AFAIK that API is not allowed on CRAN. It triggers

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

2010-06-23 Thread Martin Morgan
;s DESCRIPTION file: > Package: Test > Type: Package > Title: Testing format > Version: 1.0 > Date: 2010-06-22 > Author: Dan Murphy > Maintainer: Dan Murphy > Depends: methods > Description: Does format in a package work with S4 format me

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

2010-07-07 Thread Martin Morgan
", x=5:1) An object of class "A" Slot "x": [1] 5 8 9 8 5 Martin > > > I can't see what's wrong in my method definition. Can anyone help me = > with this? > > J > > Dr James Foadi PhD > Membrane Protein Laboratory (MPL) > Diamond Lig

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

2010-07-09 Thread Martin Morgan
> > Thanks, > Dominick > > [[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

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

2010-07-12 Thread Martin Morgan
ple-darwin9.8.0 > > locale: > [1] C > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > Best regards > Christian > _._._._._._._._._._._._._._._._._._ > C.h.r.i.s.t.i.a.n S.t.r.a.t.o.w.a > V.i.e.n.n.a A.u.s.t.

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

2010-07-12 Thread Martin Morgan
) @674e88 09 CHARSXP g0c1 [MARK,gp=0x21] "x" @728c38 09 CHARSXP g0c1 [MARK,gp=0x21] "y" Martin > a table of size 754KB seems still to be pretty large? > > Best regards > Christian > > > On 7/12/10 11:44 PM, Martin Morgan wrote: >>

Re: [Rd] Precompiled vignette on CRAN

2010-07-14 Thread Martin Morgan
> > What the people who do the CRAN package checks do get unhappy about are > packages which fail running the R code in their vignettes, since this > often indicates a problem in the package which is not exercised by the > examples nor tests. This gives a warning, as you will see in

Re: [Rd] Very slow subsetting by name

2010-07-15 Thread Martin Morgan
0, sep=""))) >> system.time(y4 <- x4[keys]) >user system elapsed > 130.390 0.000 132.316 > > And it's apparently worse than quadratic in time! > > I'm wondering why this subsetting by name is so slow since it > seems it could be implemented with x4

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 ke

Re: [Rd] parent.frame(1) of a S4 method is not a calling environment.

2010-08-16 Thread Martin Morgan
always work? > What are the additional rules? callNextMethod() will cause additional problems; the idea that you'll grab things from somewhere other than function arguments doesn't seem like a robust design, even if it's used in some important parts of R. Martin > > Man

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

[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) > lib

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' ... > W

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] Loading Cached Weaver Objects

2010-10-19 Thread Martin Morgan
On 10/19/2010 08:33 PM, Dario Strbenac wrote: > Hello, > > I'm looking for a way to extract objects from what gets created when I Sweave > with driver = weaver(). I found where the .Rdata objects are, but when I load > one into R, I don't see anything that looks like the objects that were > cre

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)) }" ?suppressPackageStartupMessage

[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 vignet

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 rbind(x1,x

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"

Re: [Rd] SEXPs and slots

2010-11-15 Thread Martin Morgan
alysis: Programming with R chapters 11 & 12, Gentleman, 2008, R Programming for Bioinformatics chapter 6 might be helpful, but by the time they arrive you might find that you're most of the way through the material covered... I guess my opinion is that Rcpp would not be useful for u

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

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

2010-11-22 Thread Martin Morgan
On 11/22/2010 03:23 AM, evilphil wrote: > > > > 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 i

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 debatab

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 tests

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

2011-01-27 Thread Martin Morgan
help too. I'm doing something very simple 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-proj

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 setOldCla

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, >

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, l

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 s

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

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 includ

Re: [Rd] another import puzzle

2011-03-26 Thread Martin Morgan
ry, not on base::summary, so without the Matrix::summary generic your object never sees the summary method for lme4 objects. So you need to Import: Matrix and importFrom(Matrix, summary). Martin Morgan exportMethods("coef","summary","show","print") exportCla

[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 'Creating

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 R

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 wi

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 FUN(X[[1L

Re: [Rd] Package Name Not Found Warning

2011-04-19 Thread Martin Morgan
ly? Martin I guess I need to use there where argument. But how do I have this call outside any S4 functions, but without having to load aroma.affymetrix when my package loads ? Original message Date: Tue, 19 Apr 2011 19:23:20 -0700 From: Martin Morgan Subject: Re: [Rd]

[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
.double.A instead 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 pat

Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Martin Morgan
ls without installing RepitoolsExamples. "if (require(RepitoolsExamples))" 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

[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 expe

[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 file

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

2011-05-17 Thread Martin Morgan
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, s

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 names(getClas

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 nam

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: Wh

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 that

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) I

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 ins

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 libra

[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 <- ne

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 crashin

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 va

[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 the

Re: [Rd] suppressing stderr output from system() calls

2011-10-05 Thread Martin Morgan
On 10/05/2011 02:36 AM, Mark Cowley wrote: Dear list, I'm trying to suppress/redirect/squash the output from commands like install.packages, or download.file. The problem is that none of: sink(..., type="message"), sink(..., type="output"), capture.output, suppressMessages are quite doing the

Re: [Rd] S4 inheritance and old class

2015-05-28 Thread Martin Morgan
ttern) grep(pattern, slotNames(x), value = TRUE) Instead of setOldClass, define a $ method on A setMethod("$", "A", function(x, name) slot(x, name)) And then a = new("A") a$ d = new("D") d$ I don't know about the setOldClass problem; it se

Re: [Rd] List S3 methods and defining packages

2015-07-07 Thread Martin Morgan
ts "plot.prcomp" "plot.princomp" "plot.profile.nls" graphicsstatsstats "plot.raster" "plot.spec" "plot.stepfun" stats graphics

Re: [Rd] download.file() on ftp URL fails in windows with default download method

2015-08-16 Thread Martin Morgan
t; > there's anything we can do to help please let me know; Elliot > > Waingold (CC'd here) can provide access to the VM we used for > > testing if that's of any help. > > > > Thanks! > > I have just been looking at this issue with Martin Mo

Re: [Rd] Issues with libcurl + HTTP status codes (eg. 403, 404)

2015-08-25 Thread Martin Morgan
On 08/25/2015 12:54 PM, Kevin Ushey wrote: Hi all, The following fails for me (on OS X, although I imagine it's the same on other platforms using libcurl): options(download.file.method = "libcurl") options(repos = c(CRAN = "https://cran.rstudio.com/";, CRANextra = "http://www.stats.ox

Re: [Rd] Issues with libcurl + HTTP status codes (eg. 403, 404)

2015-08-25 Thread Martin Morgan
than from read.dcf on error page... Martin Thanks, and sorry for the noise. Kevin On Tue, Aug 25, 2015, 13:11 Martin Morgan mailto:mtmor...@fredhutch.org>> wrote: On 08/25/2015 12:54 PM, Kevin Ushey wrote: > Hi all, > > The following fails for me (on OS X

Re: [Rd] Issues with libcurl + HTTP status codes (eg. 403, 404)

2015-08-27 Thread Martin Morgan
On 08/27/2015 08:16 AM, Martin Maechler wrote: "DM" == Duncan Murdoch on Wed, 26 Aug 2015 19:07:23 -0400 writes: DM> On 26/08/2015 6:04 PM, Jeroen Ooms wrote: >> On Tue, Aug 25, 2015 at 10:33 PM, Martin Morgan wrote: >>> >>> act

Re: [Rd] Issues with libcurl + HTTP status codes (eg. 403, 404)

2015-08-27 Thread Martin Morgan
R-devel r69197 returns appropriate errors for the cases below; I know of a few rough edges - ftp error codes are not reported correctly - download.file creates destfile before discovering that http fails, leaving an empty file on disk and am happy to hear of more. Martin On 08/27/2015 08:46

Re: [Rd] Is it possible to increase MAX_NUM_DLLS in future R releases?

2016-05-04 Thread Martin Morgan
ost (but the cost here is in small fractions of a second...) in terms of symbol look-up (and collision?), but would have no consequence for those of us with more sane use cases. Martin Morgan Patches to the R sources (development trunk in subversion at https://svn.r-project.org/R/trunk/ ) are ve

Re: [Rd] dowload.file(method="libcurl") and GET vs. HEAD requests

2016-06-21 Thread Martin Morgan
ded before trying to download it; previously R would download the error page as though it were the content. I'll give this some thought. Martin Morgan -Winston __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-deve

Re: [Rd] failed to assign RegisteredNativeSymbol for splitString

2016-07-18 Thread Martin Morgan
On 07/18/2016 03:45 PM, Andrew Piskorski wrote: I saw a warning from R that I don't fully understand. Here's one way to reproduce it: $ /usr/local/pkg/R-3.2-branch-20160718/bin/R --version | head -n 3 R version 3.2.5 Patched (2016-05-05 r70929) -- "Very, Very Secure Dishes" Copyright (

Re: [Rd] On implementing zero-overhead code reuse

2016-10-03 Thread Martin Morgan
On 10/03/2016 01:51 PM, Kynn Jones wrote: Thank you all for your comments and suggestions. @Frederik, my reason for mucking with environments is that I want to minimize the number of names that import adds to my current environment. For instance, if module foo defines a function bar, I want my

Re: [Rd] methods(`|`) lists all functions?

2016-12-08 Thread Martin Morgan
.3.1. Similar behavior is found in 3.4.0. It seems to include all functions and methods. I imagine something is being passed to "grep" without being escaped. Exactly; I've fixed this in r71763 (R-devel). Martin Morgan I hope I didn't miss something in the documentation, and

Re: [Rd] different compilers and mzR build fails

2016-12-21 Thread Martin Morgan
mzR is a Bioconductor package, so better to ask on the Bioconductor support forum https://support.bioconductor.org Oh, I see you did, and then the advice is to avoid cross-posting! The missing .o files would have been produced in an earlier compilation step; they likely failed in some way,

Re: [Rd] different compilers and mzR build fails

2016-12-21 Thread Martin Morgan
compiler output into an email message, avoding attachments. Martin On 21/12/16 17:06, Martin Morgan wrote: mzR is a Bioconductor package, so better to ask on the Bioconductor support forum https://support.bioconductor.org Oh, I see you did, and then the advice is to avoid cross-postin

Re: [Rd] R libcurl does not recognize server certs

2017-03-27 Thread Martin Morgan
solution would offer itself; I'd guess that the bundle location is inferred when R is built from source, and somehow there has been a disconnect between your R installation and certificate location, e.g., moving the certificate location after R installation. Martin Morgan John R

Re: [Rd] [PATCH] Fix missing break

2017-07-21 Thread Martin Morgan
e "pl = pairlist(1, 2); length(pl) = 1; pl" > pl = pairlist(1, 2); length(pl) = 1; pl Error in length(pl) = 1 : SET_VECTOR_ELT() can only be applied to a 'list', not a 'pairlist' Execution halted fixed in r72936 (R-devel) / 72937 (R-3-4-branch). Mart

Re: [Rd] [PATCH] Fix status in main

2017-07-21 Thread Martin Morgan
since exit() reports NA & 0377 (i.e., 0) and the incorrect assignment to runLast is immediately over-written by the correct value. Martin Morgan Index: src/main/main.c === --- src/main/main.c (revision 72935) +++ src/main/main.

Re: [Rd] [PATCH] Fix bad free in connections

2017-07-21 Thread Martin Morgan
format, ap); is successful and res >= 0. usedVasprintf is then set to TRUE, and free(b) called. It seems like the code is correct as written? Martin Morgan (the real other Martin M*) return res; } __ R-devel@r-project.org mailing list

Re: [Rd] Are Rprintf and REprintf thread-safe?

2017-11-21 Thread Martin Morgan
On 11/21/2017 04:12 PM, Winston Chang wrote: Thanks - I'll find another way to send messages to the main thread for printing. The CRAN synchronicity and Bioconductor BiocParallel packages provide inter-process locks that you could use to surround writes (instead of sending message to the main

  1   2   3   4   5   >