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] Error generated by .Internal(nchar) disappears when debugging

2015-10-07 Thread Morgan, Martin
s is only defined in the current release version of S4Vectors, which is the only version expected to straddle R versions with different signatures. Martin Morgan > > Maybe a red herring... > > ~Malcolm > > > -Original Message- > > From: R-devel [

Re: [Rd] For integer vectors, `as(x, "numeric")` has no effect.

2015-12-11 Thread Morgan, Martin
>From the Bioconductor side of things, the general feeling is that this is a >step in the right direction and worth the broken packages. Martin Morgan From: R-devel [r-devel-boun...@r-project.org] on behalf of Martin Maechler [maech...@stat.math.e

Re: [Rd] Error in socketConnection(master, port = port, blocking = TRUE, open = "a+b", : cannot open the connection

2016-01-15 Thread Morgan, Martin
e does not allow connections to port 11001. Either way, the direction toward a solution is to speak with your system administrator. If it is firewall, then they are unlikely to accommodate you; the strategy is to run your cluster exclusively on one side of the firewall. Mar

Re: [Rd] as.vector in R-devel loaded 3/3/2016

2016-03-04 Thread Morgan, Martin
I see as below, where getGeneric and getMethod imply a different signature; the signature is mode="any" for both cases in R version 3.2.3 Patched (2016-01-28 r70038)I don't know how to reproduce Jeff's error, though. > library(Matrix) > as.vector function (x, mode = "any") .Internal(as.vector(x

Re: [Rd] vignette index

2016-03-04 Thread Morgan, Martin
Within R these are determined by \VignetteIndexEntry{}. I think you are referring to the order on the CRAN landing page for your package https://cran.r-project.org/web/packages/bst/index.html, and then the question is for a CRAN member. In Rnw \documentclass{article} % \VignetteIndexEntry{01-

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
the signature is computed with the request type (HEAD vs. GET), and so the same URL doesn't work for both. (See http://stackoverflow.com/a/20580036/412655) Any help would be appreciated! I think I introduced this, in

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

2016-06-22 Thread Morgan, Martin
No I don't think there is a way to avoid the HEAD request. From: Winston Chang Sent: Wednesday, June 22, 2016 12:01:39 PM To: Morgan, Martin Cc: R Devel List Subject: Re: [Rd] dowload.file(method="libcurl") and GET vs. HEAD requests Tha

Re: [Rd] failed to assign RegisteredNativeSymbol for splitString

2016-07-18 Thread Martin Morgan
NULL; loadNamespace("tools") Thanks, it's a bug fixed with ---- r70933 | morgan | 2016-07-18 16:35:39 -0400 (Mon, 18 Jul 2016) | 5 lines assignNativeRoutines looks only in package namespace - previously looked for sy

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

Re: [Rd] R CMD check warning about compiler warning flags

2017-12-21 Thread Martin Morgan
ssociated with lines of code svn annotate doc/manual/R-exts.texi | less A quick google search (svn diff visual display) lead me to svn diff --diff-cmd meld -c73909 for my platform, which pops up the diffs in a visual context. Martin Morgan And your description seems wrong: there is now a

Re: [Rd] lapply and vapply Primitive Documentation

2020-07-10 Thread Martin Morgan
(I don't see lapply / vapply referenced as primitive in the original text changed by the commit). Martin Morgan On 7/10/20, 3:52 AM, "R-devel on behalf of Martin Maechler" wrote: >>>>> Cole Miller >>>>> on Thu, 9 Jul 2020 20:38:10

Re: [Rd] Garbage collection of seemingly PROTECTed pairlist

2020-09-13 Thread Martin Morgan
2, 1)); allocates a vector of length 2 at SEXP out = PROTECT(Rf_allocVector(INTSXP, nc)); but writes three elements (the 0th, 1st, and 2nd) at for (int i = 0; i != nr; ++i) { out_int[i] = int_mat_int[n - 1 + i * nr]; } Martin Morgan On 9/11/20, 9:30 PM, &q

Re: [Rd] Is it possible to simply the use of NULL slots (or at least improve the help files)?

2020-09-24 Thread Martin Morgan
te 'not yet initialized' and distinct from character(0) or NA_character_, but want to mention those often appropriate alternatives. With setClassUnion("maybeNumber", c("numeric", "logical")) every instance of numeric _is_ a maybeNumber, e.g., >

Re: [Rd] Is it possible to simply the use of NULL slots (or at least improve the help files)?

2020-09-24 Thread Martin Morgan
haracter", "numeric")) Error in setOldClass(c("character", "numeric")) : inconsistent old-style class information for "character"; the class is defined but does not extend "numeric" and is not valid as the data part In addition: Warning message: In

Re: [Rd] [External] Something is wrong with the unserialize function

2020-10-29 Thread Martin Morgan
(csym, psym); + UNPROTECT(1); } return class; } seems to remove the warning; I'm guessing that the other SEXP already exist so don't need protecting? Martin Morgan On 10/29/20, 12:47 PM, "R-devel on behalf of luke-tier...@uiowa.edu" wrote:

Re: [Rd] unicode in R documentation

2021-07-13 Thread Martin Morgan
I have options(useFancyQuotes = FALSE) in my ~/.Rprofile. Martin Morgan On 7/13/21, 11:37 AM, "R-devel on behalf of Frederick Eaton" wrote: Dear R Team, I am running R from the terminal command line (not RStudio). I've noticed that R has been using Unicod

[Rd] gsub() hex character range problems in R-devel?

2022-01-04 Thread Martin Morgan
libRlapack.dylib locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_4.2.0 (I have built my own R on macOS; similar behavior is observed on a Linux machine) Any hints welcome, Martin Morgan __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] gsub() hex character range problems in R-devel?

2022-01-06 Thread Martin Morgan
the UTF-8 mode for regular expressions is used, ?regex has more) However, I think it is better to formulate regular expressions to cover all of Unicode, so do something like e.g. "only keep ASCII digits, ASCII space, ASCII underscore, but remove all other characters"

[Rd] Building R from source always fails on tools:::sysdata2LazyLoadDB

2023-05-30 Thread Martin Morgan
I build my own R from source on an M1 mac. I have a clean svn checkout in one directory ~/src/R-devel. I switch to ~/bin/R-devel and the first time run cd ~/bin/R-devel ~/src/R-devel/configure --enable-R-shlib 'CFLAGS=-g -O0' CPPFLAGS=-I/opt/R/arm64/include 'CXXFLAGS=-g -O0' make -j At some poi

Re: [Rd] Building R from source always fails on tools:::sysdata2LazyLoadDB

2023-05-30 Thread Martin Morgan
Date: Tuesday, May 30, 2023 at 4:54 PM To: Martin Morgan , R-devel Subject: Re: [Rd] Building R from source always fails on tools:::sysdata2LazyLoadDB On 5/30/23 22:09, Martin Morgan wrote: > I build my own R from source on an M1 mac. I have a clean svn checkout in one > directory ~/s

Re: [Rd] Building R from source always fails on tools:::sysdata2LazyLoadDB

2023-05-31 Thread Martin Morgan
t I realized that the R-SIG-mac mailing list might have been more appropriate, but I did not see the issue discussed there. Martin From: Prof Brian Ripley Date: Wednesday, May 31, 2023 at 3:46 AM To: Martin Morgan Cc: Tomas Kalibera , R-devel Subject: Re: [Rd] Building R from source always fails

Re: [Rd] [EXTERNAL] Re: NOTE: multiple local function definitions for ?fun? with different formal arguments

2024-02-06 Thread Martin Morgan
this with data.frame df |> print(n = 2), which is an error (`n` partially matches `na.print`, and 2 is not a valid value); both methods silently ignore the typo print(m = 2). Martin Morgan From: R-devel on behalf of Henrik Bengtsson Date: Tuesday, February 6, 2024 at 4:34 PM To: Iz

Re: [Rd] conflicting imports despite using importFrom in NAMESPACE

2013-06-05 Thread Martin Morgan
ended; see section 1.5.1 of Writing R Extensions (though as a lazy programmer I kind of like the pattern "^[^\\.]"). Martin Morgan -pd On Jun 5, 2013, at 18:48 , Jombart, Thibaut wrote: Dear all, It is my understanding that using 'importFrom' in the NAMESPACE o

Re: [Rd] Extending suggestion for stopifnot

2013-08-20 Thread Martin Morgan
On 08/20/2013 11:41 AM, ivo welch wrote: A second enhancement would be a "smart string", which knows that everything inside {{...}} should be evaluated. stopifnot( is.matrix(m), "m is not a matrix, but a {{class(m)}}" ) a variant with more traditional syntax might be if (!is.matrix(m))

[Rd] Building Windows package .zip files

2013-10-20 Thread Martin Morgan
Section 1.3.3 of Writing R Extensions says "The recommended method of building binary packages is to use R CMD INSTALL --build pkg where pkg is either the name of a source tarball (in the usual .tar.gz format) or the location of the directory of the package source to be built. " (a) vignette

Re: [Rd] tar warnings in R-3.0.2 RC when R is installed by a different (non-root) user

2013-10-31 Thread Martin Morgan
On 09/23/2013 02:53 PM, Prof Brian Ripley wrote: The issue is not the ownership (uname) but the uid. A tarball can only store uids up to 'nobody' (usually 32767), and certainly larger ones cannot be unpacked portably. The many identical warnings can obscure useful messages, e.g., about invalid

Re: [Rd] Undocumented S4 method Warning For Bracket

2013-12-11 Thread Martin Morgan
On 12/05/2013 07:00 PM, Dario Strbenac wrote: Hello, With R version 3.0.2 Patched (2013-10-30 r64123) I don't see warnings that I get in R Under development (unstable) (2013-11-03 r64145) The warnings are like : Undocumented S4 methods: generic '[' and siglist 'BayMethList,ANY,ANY' The fu

Re: [Rd] External pointers and changing SEXPTYPE

2013-12-16 Thread Martin Morgan
On 12/16/2013 09:18 AM, Krzysztof Mlynarczyk wrote: Yes, it turned out that using R_PreserveObject and R_ReleaseObject solved that problem. Instead I think you want to use the third argument to R_MakeExternalPtr to protect the SEXP's you'd like to persist for the duration of the object, maybe

Re: [Rd] reference class internals

2014-01-09 Thread Martin Morgan
On 01/09/2014 07:53 PM, Norm Matloff wrote: Thanks, Hadley and Simon. The reason I asked today was that when reference classes first came out, it had appeared to me that there is no peformance advantage to using reference classes, that it was mainly a style issue (encapsulation, etc.). Unless

[Rd] eapply duplicates elements unnecessarily

2014-02-09 Thread Martin Morgan
eapply duplicates the elements of the environment it is being applied to > env = new.env(); x = 1; tracemem(x) [1] "<0x1758cd18>" > env[["x"]] = x > xx <- eapply(env, length) tracemem[0x1758cd18 -> 0x1758cbc8]: eapply but duplication seems unnecessary. I think this is because of 'duplicate' in

Re: [Rd] $new cannot be accessed when running from Rscript and methods package is not loaded

2014-02-11 Thread Martin Morgan
On 02/11/2014 09:06 AM, Winston Chang wrote: To state the issue that Kirill raised in a different way... A package with S4 or reference classes and Depends:methods can throw an error when you do something as simple as this: Rscript -e "mypackage::foo()" But this will work: Rscript -e "libr

[Rd] R CMD Sweave tmp.tex doesn't create figures with fig=TRUE, include=FALSE

2014-02-18 Thread Martin Morgan
With this file /tmp$ cat tmp.Rnw \documentclass{article} \begin{document} <>= v = seq(0, 60i, length=1000) plot(abs(v)*exp(v), type="l", col="Royalblue") @ \includegraphics{tmp-figureexample} \end{document} This command /tmp$ R --vanilla CMD Sweave tmp.Rnw Output file: tmp.tex does not produc

[Rd] instantiating a reference class with an initialize() method from .onLoad fails

2014-02-20 Thread Martin Morgan
tle: Documenting reference classes Version: 0.0.1 Date: 2012-08-05 Author: Martin Morgan Maintainer: Martin Morgan Description: This package implements a simple 'reference' class Depends: methods Imports: methods License: Apache License 2.0 Collate: b

[Rd] Sweave provides a misleading error when vignette engine not fully specified

2014-03-05 Thread Martin Morgan
Trying to Stangle / Sweave a file $ cat vignette.Rnw %\VignetteEngine{knitr} \documentclass{article} \begin{document} \end{document} results in a misleading error message: ~/tmp$ R CMD Stangle vignette.Rnw Error: Vignette engine package not specified Execution halted when what is missing is th

[Rd] CXX_STD and configure.ac in packages

2014-03-30 Thread Martin Morgan
In C++ code for use in a R-3.1.0 package, my specific problem is that I would like to use if it is available, or if not, or if all else fails. I (think I) can accomplish this with configure.ac as AC_INIT("DESCRIPTION") CXX=`"${R_HOME}/bin/R" CMD config CXX` CXXFLAGS=`"${R_HOME}/bin/R" CMD

Re: [Rd] CXX_STD and configure.ac in packages

2014-03-31 Thread Martin Morgan
attendant trade-offs -- as a guiding principle and as a pragmatic solution avoid my complicated unordered_map configure dance for now. Thanks all for the various inputs. Martin Morgan The map and unordered_map classes are a corner case, as they offer the same functionality but latter has mu

[Rd] Package vignettes share the same environment?

2014-04-05 Thread Martin Morgan
In a package 'vig' R CMD build vig (or tools::buildVignettes(dir="vig") with $ cat vig/vignettes/vig1.Rnw \documentclass{article} \begin{document} <<>>= x <- 1 @ \end{document} $ cat vig/vignettes/vig2.Rnw \documentclass{article} \begin{document} <<>>= x @ \end{document} produces vig2.pdf where

[Rd] citEntry handling of encoded URLs

2014-05-22 Thread Martin Morgan
to bibentry points to *Entry Fields*, but the 'url' tag is not mentioned there, even though url appears in the examples; if the list of supported tags is not easy to enumerate, perhaps some insight can be provided at this point as to how the supported tags are determined? Thanks Marti

Re: [Rd] citEntry handling of encoded URLs

2014-05-23 Thread Martin Morgan
On 05/23/2014 05:35 AM, Achim Zeileis wrote: On Thu, 22 May 2014, Martin Morgan wrote: The following citEntry includes a url with %3A and other encodings citEntry(entry="article", title = "Software for Computing and Annotating Genomic Ranges", author = p

Re: [Rd] R CMD check for the R code from vignettes

2014-05-31 Thread Martin Morgan
gines that ignore tangle. It is very valuable to all parties to write a vignette with code that is fully evaluated; otherwise, it is too easy for bit rot to seep in, or to 'fake' it in a way that seems innocent but is misleading. Martin Morgan is comfortable with vignettes that do

[Rd] Should a package that indirectly Suggests: a vignette engine pass R CMD check?

2014-06-14 Thread Martin Morgan
using the BiocStyle package for their vignette, and the BiocStyle package suggests the appropriate builder. 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

Re: [Rd] Re R CMD check checking in development version of R

2014-08-28 Thread Martin Morgan
On 08/27/2014 08:33 PM, Gavin Simpson wrote: On Aug 27, 2014 5:24 PM, "Hadley Wickham" I'd say: Depends is a historical artefact from ye old days before package namespaces. Apart from depending on a specific version of R, you should basically never use depends. (The one exception is, as mentio

Re: [Rd] Re R CMD check checking in development version of R

2014-08-28 Thread Martin Morgan
the class PkgC use PkgB's special functionality without ever manipulating the object of PkgA. Martin Morgan Hadley -- Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnol

[Rd] install.packages misleads about package availability?

2014-09-10 Thread Martin Morgan
In the context of installing a Bioconductor package using our biocLite() function, install.packages() warns > install.packages("RUVSeq", repos="http://bioconductor.org/packages/2.14/bioc";) Installing package into '/home/mtmorgan/R/x86_64-unknown-linux-gnu-library/3.1-2.14' (as 'lib' is unspeci

Re: [Rd] mpi.h errors on Mavericks packages

2014-10-03 Thread Martin Morgan
On 10/03/2014 04:17 PM, Daniel Fuka wrote: Dear mac folks, I have started porting a large legacy toolset maintained in windows and heavily mpi laden so it can be used across platforms in R... so I am building a package out of it. On this note, I am noticing that almost all of the mpi dependent p

Re: [Rd] mpi.h errors on Mavericks packages

2014-10-03 Thread Martin Morgan
On 10/03/2014 04:58 PM, Martin Morgan wrote: On 10/03/2014 04:17 PM, Daniel Fuka wrote: Dear mac folks, I have started porting a large legacy toolset maintained in windows and heavily mpi laden so it can be used across platforms in R... so I am building a package out of it. On this note, I am

Re: [Rd] Options that are local to the package that sets them

2014-10-31 Thread Martin Morgan
On 10/31/2014 05:55 PM, Gábor Csárdi wrote: On Fri, Oct 31, 2014 at 8:16 PM, William Dunlap wrote: You can put the following 3 objects, an environment and 2 functions that access it, in any package that need some package-specific storage (say your pkgB1 and pkgB2). .pkgLocalStorage <- new.e

[Rd] package vignettes build in the same R process?

2014-11-01 Thread Martin Morgan
If I understand correctly, all vignettes in a package are built in the same R process. Global options, loaded packages, etc., in an earlier vignette persist in later vignettes. This can introduce user confusion (e.g., when a later vignette builds successfully because a package is require()'ed in

Re: [Rd] How to maintain memory in R extension

2014-11-12 Thread Martin Morgan
ter a finalizer that runs when there are no longer references to the R object, see ?reg.finalizer or the interface to R and C finalizers in Rinternals.h. If you return more than one reference to a key, then of course you'll have to manage these in your own C++ code. Martin Morgan

Re: [Rd] Changing style for the Sweave vignettes

2014-11-13 Thread Martin Morgan
27;s underlying code; see ?browseVignettes and ?vignette for installed packages, and ?Stangle in R and R CMD Stangle for extracting the R code from stand-alone vignettes to .R files. Martin Morgan Kind regards, j. -- Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fai

Re: [Rd] R string comparisons may vary with platform (plain text)

2014-11-23 Thread Martin Morgan
not overly optimistic about setting the locale within a session. Martin Morgan On 11/23/2014 03:44 AM, Prof Brian Ripley wrote: On 23/11/2014 09:39, peter dalgaard wrote: On 23 Nov 2014, at 01:05 , Henrik Bengtsson wrote: On Sat, Nov 22, 2014 at 12:42 PM, Duncan Murdoch wrote: On 22/11/201

Re: [Rd] vapply definition question

2014-12-16 Thread Martin Morgan
ion of the function... The implementation detail is in the comment -- FUN(X[i], ...) is evaluated in the frame of lapply. Martin Morgan So, essentially, my question is whether the vapply code "should" be changed or whether a .Internal implementation should always a

Re: [Rd] R-devel does not update the C++ returned variables

2015-03-02 Thread Martin Morgan
ot;IntegerVector doubleThis(const IntegerVector x) { return x * 2; }") Rcpp::cppFunction("std::vector incrThis(std::vector x) { x[0] += 1; return x; }") or that Rcpp should become more careful (i.e., should not allow!) modifying arguments with NAMED != 0. Martin (Mor

Re: [Rd] R CMD check and missing imports from base packages

2015-04-29 Thread Martin Morgan
istinguish between stats::density() and igraph::density(). Maybe the example is not meant literally. Being able to easily flag non-imported, non-base symbols would definitely improve the robustness of package code, even if not helping the end user disambiguate duplicate symbols. Martin Morgan

[Rd] S4 method dispatch sometimes leads to incorrect when object loaded from file?

2015-05-10 Thread Martin Morgan
ad(file='b.Rda'); b" B but loading the object without first loading PkgA leads to dispatch to show,A-method. ~/tmp$ R --vanilla --slave -e "load(file='b.Rda'); b" Loading required package: PkgA A Martin Morgan -- Computationa

Re: [Rd] S4 method dispatch sometimes leads to incorrect when object loaded from file?

2015-05-11 Thread Martin Morgan
On 05/10/2015 08:19 AM, Martin Morgan wrote: Loading an S4 object from a file without first loading the library sometimes (?, the example below and actual example involves a virtual base class and the show generic) leads to incorrect dispatch (to the base class method). The attached package

Re: [Rd] S4 method dispatch sometimes leads to incorrect when object loaded from file?

2015-05-12 Thread Martin Morgan
On 05/12/2015 05:31 AM, Martin Maechler wrote: Martin Morgan on Mon, 11 May 2015 10:18:07 -0700 writes: > On 05/10/2015 08:19 AM, Martin Morgan wrote: >> Loading an S4 object from a file without first loading the library sometimes (?, >> the example b

Re: [Rd] Creating a vignette which depends on a non-distributable file

2015-05-14 Thread Martin Morgan
On 05/14/2015 04:33 PM, Henrik Bengtsson wrote: On May 14, 2015 15:04, "January Weiner" wrote: Dear all, I am writing a vignette that requires a file which I am not allowed to distribute, but which the user can easily download manually. Moreover, it is not possible to download this file autom

Re: [Rd] example fails during R CMD CHECK but works interactively?

2015-05-15 Thread Martin Morgan
On 05/15/2015 05:05 AM, Charles Determan wrote: Does anyone else have any thoughts about troubleshooting the R CMD check environment? In the pkg.Rcheck directory there is a file pkg-Ex.R. LANGUAGE=en _R_CHECK_INTERNALS2_=1 $(R_HOME)/bin/R --vanilla pkge-Ex.R followed by the usual strategy of

Re: [Rd] parallel::mclapply() dummy function on Windows?

2011-10-08 Thread Martin Morgan
On 10/07/2011 06:03 PM, John Fox wrote: Dear Tim, -Original Message- From: r-devel-boun...@r-project.org [mailto:r-devel-boun...@r-project.org] On Behalf Of Tim Triche, Jr. Sent: October-07-11 3:05 PM To: Prof Brian Ripley Cc: r-devel Subject: Re: [Rd] parallel::mclapply() dummy funct

Re: [Rd] .onLoad failing because could not find function "loadMethod"

2011-10-15 Thread Martin Morgan
- Original Message - > The thing that happens during the check is that the methods package is > not among the automatically loaded and attached packages. > > When the pkgB packages is attached, the Namespaces of pkgA and methods > are loaded but not attached. > > Note that one of the ch

Re: [Rd] C function is wrong under Windows 7

2011-10-24 Thread Martin Morgan
On 10/24/2011 06:04 AM, Evarist Planet wrote: Dear mailing list, I have a C function that gives me a wrong result when I run it under Windows Hi Evarist -- It seems like this can be written reasonably efficiently in R? getEs <-function(fchr, sign) { nfchr <- length(fchr) nsign <- len

[Rd] Windows download.file sometimes pauses / truncates large files

2011-10-25 Thread Martin Morgan
With C:\Users\User>R --version R version 2.14.0 RC (2011-10-23 r57410) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-mingw32/x64 (64-bit) running download.file('http://www.ebi.ac.uk/microarray-as/ae/files/E-TABM-25/E-TABM-25.raw.1.zip', te

Re: [Rd] Windows download.file sometimes pauses / truncates large files

2011-10-25 Thread Martin Morgan
On 10/25/2011 11:57 AM, Martin Morgan wrote: With C:\Users\User>R --version R version 2.14.0 RC (2011-10-23 r57410) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: x86_64-pc-mingw32/x64 (64-bit) running download.file('http://www.ebi.ac.uk/mi

Re: [Rd] Question about copying reference objects using the initialize method

2011-11-01 Thread Martin Morgan
On 10/31/2011 08:53 AM, Aleix Ruiz de Villa wrote: Dears, I have a question about copying reference objects using the initialize method. 1) If the latter has no arguments, there is no problem to copy an object. myClass = setRefClass("myClass", fields = list(value = "numeric") ) myClass$method

Re: [Rd] Writing new methods for `names<-`

2011-11-02 Thread Martin Morgan
On 11/02/2011 11:57 AM, Max Gasner wrote: Hi there, I'm working with an object whose internal data representation is very different from a data.frame (data is stored as a list of big.matrix objects from the bigmemory package) but to which I'd like to give users data.frame-like access. I've imple

Re: [Rd] Question about copying reference objects using the initialize method

2011-11-02 Thread Martin Morgan
friendly style? Hi -- I'm not really understanding your question. Martin Thanks again! 2011/11/1 Martin Morgan: On 10/31/2011 08:53 AM, Aleix Ruiz de Villa wrote: Dears, I have a question about copying reference objects using the initialize method. 1) If the latter has no ar

Re: [Rd] Moderating consequences of garbage collection when in C

2011-11-14 Thread Martin Morgan
On 11/14/2011 11:47 AM, dhi...@sonic.net wrote: dhi...@sonic.net wrote: Martin Morgan wrote: 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'

Re: [Rd] Moderating consequences of garbage collection when in C

2011-11-14 Thread Martin Morgan
On 11/14/2011 01:12 PM, dhi...@sonic.net wrote: Martin Morgan wrote: > On 11/14/2011 11:47 AM,dhi...@sonic.net wrote: > > dhi...@sonic.net wrote: > >> Martin Morgan wrote: > > > > I had done some google searches on this issue, since it seemed l

Re: [Rd] .Call in R

2011-11-18 Thread Martin Morgan
On 11/18/2011 07:08 AM, Karl Forner wrote: Hi, A probably very naive remark, but I believe that the probability of sum( runif(1) )>= 5 is exactly 0.5. So why not just test that, and generate the uniform values only if needed ? My thought as well, but actually the deviates need to have

[Rd] Reference class finalize() fails with 'attempt to apply non-function'

2011-12-08 Thread Martin Morgan
This bug appears intermittently in R CMD check when reference classes have finalize methods. The problem is that garbage collection can be run after the methods package is no longer available. It affects (periodically) the Bioconductor AnnotationDbi package as well as packages that contain Rcpp

<    1   2   3   4   5   >