[Rd] S4 NAMESPACE method imports and exports do not include (promoted?) generics

2011-12-15 Thread Martin Morgan
b=1:5)) Error in unique.default(b) : unique() applies only to vectors A workaround is for PkgB to also export(unique), and for PkgC to also importFrom(PkgA, unique), but is this the intention? This is arising from Bioconductor efforts to place commonly promoted functions and S3 classes int

[Rd] R CMD check fails to warn about undocumented classes and methods

2011-12-15 Thread Martin Morgan
ies ... WARNING Undocumented code objects: ‘bunique’ All user-level objects in a package should have documentation entries. See the chapter 'Writing R documentation files' in the 'Writing R Extensions' manual. * checking for code/documentation mismatches ... OK Martin -- Comput

Re: [Rd] R CMD check fails to warn about undocumented classes and methods

2011-12-15 Thread Martin Morgan
On 12/15/2011 03:40 PM, Martin Morgan wrote: In > R.version.string [1] "R Under development (unstable) (2011-12-15 r57901)" PkgA promotes 'unique' to a generic and exports that DESCRIPTION: Imports: methods R/f.R: setGeneric("unique") NAMESPACE: export(uniq

Re: [Rd] R CMD check fails to warn about undocumented classes and methods

2011-12-16 Thread Martin Maechler
> On 12/15/2011 03:40 PM, Martin Morgan wrote: > > In > > > > > R.version.string > > [1] "R Under development (unstable) (2011-12-15 r57901)" > > > > PkgA promotes 'unique' to a generic and exports that > > > &g

Re: [Rd] Undocumented functions

2011-12-16 Thread Martin Maechler
(installed) package has a NAMESPACE anyway, package authors really should use a NAMESPACE themselves (instead of the "auto-generated at installation-time" one) and export the non-internal function Martin > On 16/12/2011 1:01 a.m., Nicola Sturaro Sommacal wrote: >> Hi!

Re: [Rd] R CMD check fails to warn about undocumented classes and methods

2011-12-16 Thread Martin Morgan
On 12/16/2011 02:02 AM, Martin Maechler wrote: On 12/15/2011 03:40 PM, Martin Morgan wrote: In > R.version.string [1] "R Under development (unstable) (2011-12-15 r57901)" PkgA promotes 'unique' to a generic and exports that DESCRIPTION: Imports: methods R/

Re: [Rd] S4 NAMESPACE method imports and exports do not include (promoted?) generics

2011-12-16 Thread Martin Morgan
tar of Pkgs A, B, C attached. Martin On 12/15/2011 03:34 PM, Martin Morgan wrote: In > R.version.string [1] "R Under development (unstable) (2011-12-15 r57901)" section 1.6.6 of 'Writing R Extensions' says Note that exporting methods on a generic in the namespa

Re: [Rd] S4 NAMESPACE method imports and exports do not include (promoted?) generics

2011-12-16 Thread Martin Morgan
y if the generic found in either PkgB's namespace or namespace imports were imported along with the method. Not sure that I like the idea of calling setGeneric() -- PkgA could have done something non-standard -- and would rather an error. Thans for your attention. Martin Comments? John O

Re: [Rd] Saving nothing with save()

2011-12-19 Thread Martin Maechler
save()ing all your findings, it wouldn't have been such a good day, would it? well, in spite of that. I agree that save() should warn or stop in that case. I have now committed a version -- to R-devel only -- which stop()s if 'pretest=TRUE' and uses w

Re: [Rd] Saving nothing with save()

2011-12-20 Thread Martin Maechler
>>>>> Simon Urbanek >>>>> on Mon, 19 Dec 2011 10:38:34 -0500 writes: > Martin, On Dec 19, 2011, at 6:39 AM, Martin Maechler > wrote: >>>>>>> Barry Rowlingson on >>>>>>> Sun, 18 Dec 2011 01:32:52

Re: [Rd] S4 NAMESPACE method imports and exports do not include (promoted?) generics

2011-12-22 Thread Martin Morgan
be unfortunate if the exported generic also carried with it the burden of documenting the generic (again). Even with the insights from this thread, I find myself spending a very long time working out the appropriate NAMESPACE declarations for my current projects. Martin John Thanks, Micha

Re: [Rd] Debugging namespace problems

2011-12-23 Thread Martin Morgan
quot;)] (Code isn't reproducible, but should give you the basic idea) I think it's this line if (!exists(scale_name, globalenv())) next in scales_add_defaults, where the symbol isn't found in the globalenv() when nstest is attached and ggplot2 only loaded, but

Re: [Rd] Debugging namespace problems

2011-12-23 Thread Martin Morgan
On 12/23/2011 02:11 PM, Martin Morgan wrote: On 12/23/2011 11:54 AM, Hadley Wickham wrote: And one last note: I'm reasonably certain I haven't forgotten to export an S3 method because I wrote the following script to (crudely) compare the function definitions in ggplot2 with its name

Re: [Rd] Debugging namespace problems

2011-12-23 Thread Martin Morgan
v for ggplot2, and to the name space for nstest. Wonderful - thanks! Any hints on how you discovered the problem? nothing clever to report; it reproduces at the command line so traceback(), options(error=recover), and then debug(ggplot2::ggplot_build). Martin Hadley -- Computational Bi

Re: [Rd] CRAN link broken

2011-12-31 Thread Martin Maechler
> Prof Brian Ripley > on Sat, 31 Dec 2011 06:36:04 + writes: > This is not the CRAN webmaster's address[*], and the > problem has been reported several times already to the > proper places. No one reading this list apart from the > handful with CRAN administrator

Re: [Rd] CRAN link broken -- Swiss "backup"

2011-12-31 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Sat, 31 Dec 2011 12:15:10 +0100 writes: >>>>> Prof Brian Ripley >>>>> on Sat, 31 Dec 2011 06:36:04 + writes: >> This is not the CRAN webmaster's address[*], and the >>

[Rd] interesting connection / finalizer bug?

2012-01-06 Thread Martin Morgan
This setOldClass(c("file", "connection")) .A <- setRefClass("A", fields=list(con="connection"), methods=list( finalize = function() { if (isOpen(con)) close(con) })) f <- tempdir() a <- .A$new(con=file(f, "rb")) cl

Re: [Rd] problem with R installation package

2012-01-10 Thread Martin Maechler
> patient. For now you can install your package from source using: > install.packages("G2Sd", type="source") > ps: This is a question for the r-help mailing list, not r-devel. Yes, indeed! Martin Maechler __ R-deve

Re: [Rd] serializing recordedplot object

2012-01-10 Thread Martin Morgan
ta bases) and [to be explicit] references to c / c++ (probably many packages using Rcpp produce these) objects. Martin In the case of the NativeSymbolInfo object, it should not be too hard to add an optional feature to unserialize which reloads the package and NativeSymbolInfo when it runs into

[Rd] A: ImportFrom(B, ...) -- B: ImportFrom(A, ...)

2012-01-14 Thread Martin Maechler
ld be considerably more natural if each could import some facilities from the other, instead of having an asymmetry A --> B (or B --> A). Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Resume processing after warning handler.

2012-02-04 Thread Martin Morgan
On 02/03/2012 02:49 AM, Titus von der Malsburg wrote: Dear list! I have a script that processes a large number of data files. When one file fails to process correctly, I want the script to write a message and to continue with the next file. I achieved this with tryCatch: for (f in files)

[Rd] RFC: Proposal to make NROW() and NCOL() slightly more general

2012-02-04 Thread Martin Maechler
if(length(dim(x)) > 1L || is.data.frame(x)) ncol(x) else 1L I've tested to see that it does not change any of the R 'make check-all' checks... but I'd really like to let this pass by as a general RFC.. (in spite of the fact that I'll offline for almost all the rest of

Re: [Rd] RFC: Proposal to make NROW() and NCOL() slightly more general

2012-02-06 Thread Martin Maechler
> On Sat, Feb 4, 2012 at 10:38 AM, Martin Maechler > wrote: > > The help has > > > >> Description: > > > >>   'nrow' and 'ncol' return the number of rows or columns present in 'x'. > >>   'NCOL' and

Re: [Rd] Resume processing after warning handler.

2012-02-06 Thread Martin Morgan
On 02/06/2012 04:46 AM, Titus von der Malsburg wrote: On Sat, Feb 4, 2012 at 4:37 PM, Martin Morgan wrote: On 02/03/2012 02:49 AM, Titus von der Malsburg wrote: Hi Titus -- use withCallingHandlers to capture the warning, and invokeRestart() to continue after handling it. withCallingHandlers

Re: [Rd] mem.limits deprecated

2012-02-06 Thread Martin Morgan
devel): 29749 ripley #define Min_Nsize 22 29749 ripley #define Min_Vsize (1*Mega) Martin Obviously this is message is late, the decision has been made and we were not paying attention when we should have. However if there is possibly anything that can be done to rescue some of this

Re: [Rd] RFC: Proposal to make NROW() and NCOL() slightly more general

2012-02-07 Thread Martin Maechler
>>>>> Martin Maechler >>>>> on Mon, 6 Feb 2012 15:35:36 +0100 writes: >> On Sat, Feb 4, 2012 at 10:38 AM, Martin Maechler >> wrote: >> > The help has >> > >> >> Description: >> >

Re: [Rd] capture.output() is trying to allocate 17179869182.6 Gb on my not so big data.frame

2012-02-07 Thread Martin Morgan
the function; the return in the _PRINT_DEAL_c_eq_0 macro makes it difficult to balance the protection stack, and R_alloc seems to be a better solution anyway. diff attached. Martin Morgan I get something similar with R 2.14.1. Cheers, H. > sessionInfo() R Under development (unstable) (

Re: [Rd] capture.output() is trying to allocate 17179869182.6 Gb on my not so big data.frame

2012-02-08 Thread Martin Maechler
>>>>> Martin Morgan >>>>> on Tue, 7 Feb 2012 19:31:41 -0800 writes: > On 02/07/2012 04:08 PM, Hervé Pagès wrote: >> Hi, >> >> This is what I get with recent R devel on a 64-bit Ubuntu laptop: >> >> &

Re: [Rd] method using several (and different) arguments in turn

2012-02-14 Thread Martin Morgan
Method("newsample", "XSample", function(type, x=numeric(), ...) { "XSample" }) setMethod("newsample", "YSample", function(type, x=numeric(), ...) { "YSample" }) One could implement a default method on "TypeOfSample&qu

Re: [Rd] requesting a new SIG mailing list

2012-02-16 Thread Martin Maechler
> I think ecology is a more inclusive term than > environmental anyway, but then I'm an ecologist. > Sarah ah, that's an interesting side issue, and at first somewhat counter intuitive to a layman like me,... but after thinking a bit about the meaning of the words, mos

[Rd] Parallel R CMD check?

2012-02-16 Thread Martin Morgan
hints, Martin -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: M1-B861 Telephone: 206 667-2793 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [Rd] Parallel R CMD check?

2012-02-17 Thread Martin Morgan
On 02/17/2012 01:42 AM, Prof Brian Ripley wrote: On 17/02/2012 06:50, Martin Morgan wrote: Running R CMD check on a package can take quite a lot of time. Checks seem like they could be run in parallel (separate processes for, e.g., codoc, examples, tests, ...). Is there a way to do this? My

Re: [Rd] Why cant my S4 class have a slot named `C`?

2012-02-21 Thread Martin Morgan
R's rules of partial matching mean that C matches Class before the unnamed "SVM", as in f = function(XXX=1, ...) XXX f(2, X=3) # returns 3 so name your arg to new SVM <- function(x, y, C, eps) { new(Class="SVM", x=x, y=y, C=C, eps=eps) } Martin ===

Re: [Rd] function remains loaded in the search space after detaching the package

2012-02-24 Thread Martin Maechler
ing something? Yes: the argument 'unload' of detach(). In general: Now that every package has a namespace, you (and others) should learn the difference between attaching and loading - and hence detach()ing and unloading a package with its namespace. ?detach ?library etc should give a good start. Martin Maechler, ETH Zurich __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] improved error message when existing implicit S4 generic is not imported?

2012-02-25 Thread Martin Morgan
must have been made generic, explicitly or implicitly; not true when loading 'pkgB' for 'plot' Error: loading failed Execution halted ERROR: loading failed which doesn't seem accurate, rather "'pkgB' does not import S4 implicit generic for 'plot&#

[Rd] Comments on R_exts section 1.6.6, Namespaces with S4 classes and methods

2012-02-26 Thread Martin Morgan
, primitive functions are currently singled out for special treatment in several sub-clauses of section 1.6.6. Aggregating these sub-clauses into a separate paragraph on primitives would be clearer. Martin -- Computational Biology Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N.

Re: [Rd] Identical copy of base function

2012-02-27 Thread Martin Maechler
led ``namespace'' : One example which lead me to implement the above: The Matrix package has had an identical copy of 'det' for a while now, but of course in the Matrix namespace. Because of that, the call to determinant() inside det() will correctly dispatch Matrix methods for de

Re: [Rd] Identical copy of base function

2012-02-27 Thread Martin Maechler
read the code yet, and I am sure Matrix will "do > the right thing", but I have strong reservations about > this behavior when applied to the general universe of R > and CRAN. > Jeff > On Mon, Feb 27, 2012 at 6:03 AM, Martin Maechler > wrote:

Re: [Rd] portable parallel seeds project: request for critiques

2012-03-02 Thread Martin Maechler
s of 10^10 random > numbers each from an >> SFMT generator with cycle length ρ = 2^11213, we have a >> probability of overlap p ≈ 10^3362. >> > What do you think ? well, if that article really gets a probability of 10^3362 (= Inf in R's double

Re: [Rd] Unexpected behaviour for RowSideColors in function heatmap

2012-03-12 Thread Martin Maechler
.org/) Thanks you very much, Pär (and Kevin) ! Martin > P�r > On 8 Mar 2012, at 17:27, Kevin R. Coombes wrote: > > First, I can confirm this problem exists today, and can now vaguely recall > > seeing it in previous version of R. > > > sessionInfo() > > R versio

Re: [Rd] --as-cran and need to ignore.svn directories

2012-03-12 Thread Martin Maechler
7;svn export' svn directory to a > temporary directory/folder: No, I don't think that should not be needed. When building the tarball, 'R CMD build' *does* ignore the .svn folders, at least for me. Paul's problem was using --as-cran on his SVN *directory* but th

[Rd] methods::trace fails when signature specified

2012-03-14 Thread Martin Morgan
With > R.version.string [1] "R version 2.15.0 alpha (2012-03-14 r58748)" trying to trace a method using the 'signature' argument fails rather than enabling the trace: > trace(initialize, signature="ANY") Error in matchSignature(signature, fdef, where) : trying to match a method signature of

Re: [Rd] Dealing with printf() &c. in third-party library code

2012-03-14 Thread Martin Morgan
ges the user to save and quit immediately, though this is far from ideal. I too would be interested in better practices for dealing with this, short of whole-sale modification of the third-party library. Martin All the best, Jon __ R-devel@r-

Re: [Rd] Dealing with printf() &c. in third-party library code

2012-03-15 Thread Martin Morgan
On 03/15/2012 02:24 PM, Jon Clayden wrote: Martin, Thanks for your reply. I wonder if you'd be willing to post your "my_fprintf" function, since I'm struggling to get around needing to use the "stdout" and "stderr" symbols completely. Thi

Re: [Rd] Typo in ?Logistic

2012-03-27 Thread Martin Maechler
that read "[dpq]logis" instead? yes, indeed; now fixed. Thank you very much! Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] CRAN policies

2012-04-02 Thread Martin Maechler
bust way for package authors to declare nonstandard evaluation to the checkUsage() checks. Maybe we should branch a new thread about this, for proposals on how to go about this. Martin > Another possible part of the problem is that if checkUsage > is checking a function like &

Re: [Rd] [patch] giving library() a 'version' argument

2012-04-13 Thread Martin Maechler
I was involved in fixing it..): Indeed nowadays, packageDescription() *) *does* use the correct package version, by inspecting the "path" attribute of the package, in the same way as searchpaths() does --- a function, BTW, that I think should be known and used more than I think it is. *) packageVersion() is built on packageDescription() and hence is also correct accordingly. -- Martin Maechler, ETH Zurich (and R core). __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R-2.15.0 and Exporting Methods Converted To S4 Generic

2012-04-13 Thread Martin Morgan
n of the bug reported here https://stat.ethz.ch/pipermail/r-devel/2012-April/063783.html A work-around seems to be an unconditional setGeneric("image"). Martin If the problem is because of the exportMethods(), I'm left stumped as to how to work around this. Making our S4 objects use

[Rd] Minor bug: plot.table and Axis.table (partially) ignore graphical parameters (patch included)

2012-04-17 Thread Martin Becker
ove the minor bug and simplify the code. As a downside, the change breaks code which uses 'axes' as '...'-argument in a call to Axis.table(). But, as already mentioned, this is neither documented nor working for other methods of Axis. So, please consider applying t

Re: [Rd] Proposal: model.data

2012-05-04 Thread Martin Maechler
se it to fix termplot unless it is in base. Indeed. I think it would be useful to "branch this topic" into one part where it is about fixing termplot() and predict(*, type = "terms") because -- as it happens -- I've got this on my todo list to look at, for a cou

Re: [Rd] How to list package dependency on a Bioconductor package?

2012-05-08 Thread Martin Morgan
ng about a Bioconductor package here; the Mac binaries are available for R-2-15 http://bioconductor.org/packages/release/bioc/html/edgeR.html in the usual way; the Windows binaries are apparently discovered by the CRAN build system, so it sounds like CRAN's Mac builds are mis-configured, or B

Re: [Rd] R package dependency issues when namespace is not attached

2012-05-13 Thread Martin Morgan
look-up. These issues become increasing important as the hierarchy of package relationships becomes deep. The best practice is for authors to import all necessary symbols, but no more! Martin dependency. There are a lot of packages on CRAN that use Depends and are not explicitly importing

Re: [Rd] R package dependency issues when namespace is not attached

2012-05-13 Thread Martin Morgan
On 05/13/2012 01:39 PM, Duncan Murdoch wrote: On 12-05-13 4:06 PM, Martin Morgan wrote: On 05/13/2012 12:14 PM, Jeroen Ooms wrote: On Sun, May 13, 2012 at 10:14 AM, Uwe Ligges wrote: I do not see any problem in R. If someone is going to import a Namespace, he or she has to do that via

Re: [Rd] "Incompatible methods" for overloaded operator

2012-06-20 Thread Martin Morgan
B"), function(e1, e2) message("A + B")) setMethod("+", c("B", "A"), function(e1, e2) message("B + A")) setMethod("+", c("B", "B"), function(e1, e2) message("B + B")) with exportClasses("A", &

Re: [Rd] S4 Reference Classes: declaring public and private methods

2012-06-20 Thread Martin Morgan
meone else will be more bold. Martin You'll find a small code example of what I mean at Stackoverflow: http://stackoverflow.com/questions/11073253/oop-with-r-is-there-a-way-to-declare-public-and-private-methods-s4-reference-c Thanks a lot, Janko Thyson _

Re: [Rd] "Incompatible methods" for overloaded operator

2012-06-20 Thread Martin Morgan
On 06/20/2012 08:06 PM, Hadley Wickham wrote: from ?groupGeneric under 'Ops' (of which "+" is one) used. If different methods are found, there is a warning about 'incompatible methods': in that case or if no method is found for either argument the internal method i

Re: [Rd] Dependency problem for "hasArg"

2012-07-02 Thread Martin Morgan
he beginning of your script. But I think the idea will be to import(methods) in HydroGOF, since the package requires these imports to function properly, and import'ing will mean that hasArg does not have to be found on the (user-controlled) search path. Martin For whatever reason, l

Re: [Rd] Dependency problem for "hasArg"

2012-07-03 Thread Martin Morgan
On 07/03/2012 09:07 AM, Mauricio Zambrano-Bigiarini wrote: On 02/07/12 22:51, Martin Morgan wrote: On 07/02/2012 06:23 PM, Charlie Friedemann wrote: The error message you are getting makes it rather clear what the problem is. R is unable to find the function 'hasArg'. As the hasArg f

Re: [Rd] creating a '[' method for an S4 class

2012-07-07 Thread Martin Maechler
> Benilton Carvalho > on Sat, 7 Jul 2012 03:49:34 +0100 writes: > Hi, > I'm working on an S4 class that is expected to behave like an array. > I have some difficulties when defining '[' and I wonder if someone > could point me to the right direction: > 1) Call t

Re: [Rd] installing spam package is failing (spam_0.29-1)

2012-07-19 Thread Martin Maechler
>>>>> Dirk Eddelbuettel >>>>> on Wed, 18 Jul 2012 20:16:25 -0500 writes: > For Pete's sake, could you please stop spamming the > r-devel list? Indeed! R-devel is reserved for people who do their homework! I've added "moderation&quo

Re: [Rd] Are R packages supposed to be "relocatable"? (avoiding BioConductor scripts...)

2012-07-19 Thread Martin Morgan
cation to avoid confusion (avoiding 'first time users should do A, return users should do B'). As a 'normal' user it is safe and appropriate to use biocLite to manage Bioconductor (and CRAN) packages. One takes a more cautious approach as 'root', but I personally

[Rd] setMethod sometimes fails to set package slot when signature has trailing 'ANY'

2012-08-05 Thread Martin Morgan
ot; This does not occur when the order of setMethod calls is reversed. The reason is that the package information added when methods/R/Methods.R:552 calls matchSignature are stripped (because matchSignature returns a vector with trailing 'ANY' classes removed) by the call to .matchSigL

Re: [Rd] setMethod sometimes fails to set package slot when signature has trailing 'ANY'

2012-08-07 Thread Martin Morgan
On 08/07/2012 02:43 PM, John Chambers wrote: Good catch. This should have been fixed in r-devel, revision 60192. If nothing bad results in other tests, we'll port it to the current patched version. Thank you for the fix. Martin Thanks, John On 8/5/12 4:31 PM, Martin Morgan

Re: [Rd] [R] debug vs regular mode

2012-08-10 Thread Martin Morgan
On 08/10/2012 12:04 PM, peter dalgaard wrote: Not to spoil your fun, but this is getting a bit off-topic for R-help. If you wish to continue the debugging process in public, I think you should move to R-devel. Also, it sounds like the problem is in the glmulti package, so you might want to in

[Rd] data() documentation ambiguous about loaded versus attached packages?

2012-08-17 Thread Martin Morgan
so without specifying 'package', and without specifying an 'envir' argument (hence overwriting user objects in the global environment). > R.version.string [1] "R Under development (unstable) (2012-08-17 r60296)" Martin -- Computational Biology /

[Rd] Quiz: How to get a "named column" from a data frame

2012-08-18 Thread Martin Maechler
to most R users and probably not even to the majority of R-devel readers... OTOH, people like Bill Dunlap will not take long to provide it or a better one. (*) In my solution, the above '...' consists of 17 letters. I'll post it later today (CEST time) ... or confirm that someone

Re: [Rd] Quiz: How to get a "named column" from a data frame

2012-08-18 Thread Martin Maechler
On Sat, Aug 18, 2012 at 5:14 PM, Christian Brechbühler wrote: > On Sat, Aug 18, 2012 at 11:03 AM, Martin Maechler > wrote: >> >> Today, I was looking for an elegant (and efficient) way >> to get a named (atomic) vector by selecting one column of a data frame. >&g

[Rd] mccollect does not return named, ordered results when wait=FALSE

2012-08-18 Thread Martin Morgan
?mccollect say 'mccollect' returns any results that are available in a list. The results will have the same order as the specified jobs. If there are multiple jobs and a job has a name it will be used to name the result, otherwise its process ID will be used. If none of the

Re: [Rd] Quiz: How to get a "named column" from a data frame

2012-08-18 Thread Martin Maechler
been as.matrix(df)[,1] Now, the remaining question is: Shouldn't there be something more natural to achieve that? (There is not, currently, AFAIK). Martin > Best, > -- > Joshua Ulrich | about.me/joshuaulrich > FOSS Trading | www.fosstrading.com > O

[Rd] parLapply fails to detect default cluster?

2012-08-21 Thread Martin Morgan
th(cl) is determined before defaultCluster(cl) is called. By inspection, this appears to be true of other high-level functions, but ironically not of parApply. In defaultCluster, t would also be helpful to check that the detected cluster, user-supplied or other, is a valid cluster. diff attached

Re: [Rd] parLapply fails to detect default cluster?

2012-08-28 Thread Martin Morgan
Thank you for the fix, in svn R-devel and 2-15-patched r60447, r60448. Martin On 08/21/2012 06:50 AM, Martin Morgan wrote: invoking parLapply without a cluster fails to find a previously registered cluster > library(parallel) > setDefaultCluster(makePSOCKcluster(2)) > parLapply(X

[Rd] stack overflow? was Re: [R] segfault in gplots::heatmap.2

2012-08-30 Thread Martin Morgan
occurs. I think R overflows its stack, and that rJava just makes that more likely to occur. I don't really know how to investigate a stack overflow further. Martin R version 2.15.1 Patched (2012-08-26 r60438) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=

Re: [Rd] if(--as-cran)?

2012-09-03 Thread Martin Maechler
ast want that the auto-printing worked like in toplevel, so I don't have to write a print(.) around every ..i that would autoprint if in toplevel, and of course does *not* autoprint inside if(.) { .. }. Martin Maechler, ETH Zurich > Dirk > | /Henrik > --

Re: [Rd] if(--as-cran)?

2012-09-04 Thread Martin Maechler
e that I've made it the default for me. I strongly believe we should follow the thread Henrik has started and Dirk and I had followed up. The issue is not just about "CRAN" vs "off CRAN". It is good to think about a more general scheme of "light testing" vs "

Re: [Rd] if(--as-cran)?

2012-09-05 Thread Martin Maechler
se 3 or 4 (or 5) such levels, e.g., 1: very quick 2: CRAN-ok-quick 3: package-developer-usual 4: extensive *and* the CRAN maintainers would say which level is the one that runs daily on CRAN and hence needs to meet Duncan's TIMELIMIT. So instead of just setting an en

Re: [Rd] if(--as-cran)?

2012-09-05 Thread Martin Maechler
timings. For me as package developer, the timings may be even more important in the "long" than in the "short" checks case. So, one solution that is little work would be that --as-cran sets an *extra* environment variable that is *only* set by --as-cran, but by no other command line switch. Still a pity that it seems people want to live in a 0/1 setting when it would be very natural to adopt a 0/1/2/3 (or so) one. It's a bit like prefering verbose = FALSE/TRUE as argument to an R function where eventually I often found that using a tracing = 0/1/2 (or then 'verbose' = 0/1/2 which is almost back compatible to FALSE/TRUE) was more useful. >> I asked the CRAN powers-that-be about the possibility of querying the amount >> of time remaining before a timeout; since the different platforms all use >> different mechanisms to enforce a timeout, that's not really practical. So >> the best you could hope for is to know that a timeout is in effect. Before >> I wrote any code, I'd need to hear why --as-cran detection isn't sufficient. I agree that *reliable* --as-cran detection solves the OP's and most other correspondents problem. But as argued above, _R_CHECK_TIMINGS_ is not sufficient. Martin __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] all.equal on external pointers and environments

2012-09-05 Thread Martin Morgan
st(e), as.list(new.env())) all.equal(new.env(), new.env()) ## TRUE; ok? Martin -- 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] Is invokeRestart("abort") unstoppable?

2012-09-11 Thread Martin Morgan
On 09/11/2012 04:19 PM, Henrik Bengtsson wrote: Hi, I'm trying to implement an abort() method that works just like stop() but does not signal the condition such that try() and tryCatch(..., condition=...) are, contrary to stop(), effectively non-working with abort() calls. In order to achieve t

[Rd] methods cbind2 bind_activation disrupts cbind everywhere

2012-09-12 Thread Martin Morgan
a safe way for a package to use cbind2? This came up in the context of complex package dependencies in Bioconductor, as detailed in this thread (sorry for the html). https://stat.ethz.ch/pipermail/bioc-devel/2012-September/003617.html -- Dr. Martin Morgan Fred Hutchinson Cancer Research Center

Re: [Rd] methods cbind2 bind_activation disrupts cbind everywhere

2012-09-14 Thread Martin Maechler
>>>>> Martin Morgan >>>>> on Wed, 12 Sep 2012 15:23:02 -0700 writes: > The methods package ?cbind2 includes the instruction to > use via methods:::bind_activation(TRUE). well, "instruction" only if one wants to magically enable its u

Re: [Rd] methods cbind2 bind_activation disrupts cbind everywhere

2012-09-15 Thread Martin Morgan
option is wholesale deprecation of S4 ... but I won't start that conversation with either of you ;-) Jeff On Fri, Sep 14, 2012 at 3:00 AM, Martin Maechler wrote: Martin Morgan on Wed, 12 Sep 2012 15:23:02 -0700 writes: > The methods package ?cbind2 includes the instru

Re: [Rd] different behavior accessing type-specific as.data.frame inside a function vs inside R shell

2012-09-19 Thread Martin Morgan
we are all novice R developers am hoping someone on the list can provide some insight. many thanks for your time, brian [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- Dr. Martin Morgan, PhD Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] Segmentation fault when options(max.print = .Machine$integer.max)

2012-09-24 Thread Martin Morgan
24 r60800) Platform: x86_64-unknown-linux-gnu (64-bit) ... also R-patched, etc. Martin -- 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] Segmentation fault when options(max.print = .Machine$integer.max)

2012-09-25 Thread Martin Maechler
an integer overflow at src/main/printvector.c:176 > > sessionInfo() > R Under development (unstable) (2012-09-24 r60800) > Platform: x86_64-unknown-linux-gnu (64-bit) > ... > also R-patched, etc. Thank you, Martin. I'm about to commit fixes for this. "anot

Re: [Rd] Segmentation fault when options(max.print = .Machine$integer.max)

2012-09-25 Thread Martin Morgan
On 09/25/2012 05:26 AM, Martin Maechler wrote: Seemed like a good idea at the time, I'm curious. Why is it (setting max.print much too large) a good idea? I usually set it considerably smaller (50) than default to conserve screen real estate, but then occasionally need to see more

Re: [Rd] Segmentation fault when options(max.print = .Machine$integer.max)

2012-09-25 Thread Martin Maechler
>>>>> Martin Morgan >>>>> on Tue, 25 Sep 2012 05:34:12 -0700 writes: > On 09/25/2012 05:26 AM, Martin Maechler wrote: >> >>> Seemed like a good idea at the time, >> >> I'm curious. Why is it (setting max.

Re: [Rd] S4method

2012-09-28 Thread Martin Morgan
le = deparse(substitute(y)), caption = "", margin = c(NA, NA, NA, NA)) } The error I get is Bad \usage lines found in documentation object 'xyPlot-methods': S4method{xyPlot}{numeric, numeric}(x, y, Hi David - R is being picky about spaces; use {numeric,numeric}. Mart

Re: [Rd] Fastest non-overlapping binning mean function out there?

2012-10-03 Thread Martin Morgan
<- do.call(seq, c(as.list(range(x)), length.out=nb)) leading to > bx1 <- c(bx[-1], bx[nb] + 1) > system.time(res <- binmean(x, bx1)) user system elapsed 0.052 0.000 0.050 Martin Thanks, Henrik __ R-devel@r-project.org m

Re: [Rd] Fastest non-overlapping binning mean function out there?

2012-10-03 Thread Martin Morgan
On 10/3/2012 6:47 AM, Martin Morgan wrote: On 10/02/2012 05:19 PM, Henrik Bengtsson wrote: Hi, I'm looking for a super-duper fast mean/sum binning implementation available in R, and before implementing z = binnedMeans(x y) in native code myself, does any one know of an existing fun

[Rd] identical() fails to compare isS4() to TRUE

2012-10-04 Thread Martin Morgan
> setClass("A", "integer") > isS4(new("A")) [1] TRUE > identical(isS4(new("A")), TRUE) [1] FALSE > sessionInfo() R Under development (unstable) (2012-10-04 r60876) Platform: x86_64-unknown-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC

Re: [Rd] identical() fails to compare isS4() to TRUE

2012-10-04 Thread Martin Morgan
On 10/04/2012 02:23 PM, Duncan Murdoch wrote: On 12-10-04 4:57 PM, Martin Morgan wrote: > setClass("A", "integer") > isS4(new("A")) [1] TRUE > identical(isS4(new("A")), TRUE) [1] FALSE > sessionInfo() R Under development (unstable

Re: [Rd] identical() fails to compare isS4() to TRUE

2012-10-04 Thread Martin Morgan
On 10/04/2012 04:05 PM, Duncan Murdoch wrote: On 12-10-04 5:50 PM, Martin Morgan wrote: On 10/04/2012 02:23 PM, Duncan Murdoch wrote: On 12-10-04 4:57 PM, Martin Morgan wrote: > setClass("A", "integer") > isS4(new("A")) [1] TRUE > id

Re: [Rd] identical() fails to compare isS4() to TRUE

2012-10-05 Thread Martin Morgan
On 10/04/2012 05:56 PM, Martin Morgan wrote: On 10/04/2012 04:05 PM, Duncan Murdoch wrote: On 12-10-04 5:50 PM, Martin Morgan wrote: On 10/04/2012 02:23 PM, Duncan Murdoch wrote: On 12-10-04 4:57 PM, Martin Morgan wrote: > setClass("A", "integer") &g

[Rd] S4 fails to initialize linear hierarchies with intermediate VIRTUAL classes

2012-10-18 Thread Martin Morgan
value) { .value <- as(from, "B", TRUE) as(.value, "A") <- value ... as(from, "B", TRUE) correctly returns an instance of C. Also VIRTUAL isn't mentioned on ?Classes or ?setClass and isn't documented on class?VIRTUAL, making me wonder whet

Re: [Rd] simplify2array edge case

2012-10-19 Thread Martin Maechler
n, ... ... ) had really been part of sapply() at the time and hence needed to go into simplify2array() in order to keep sapply() completely back compatible. Bill, have you looked into optional different behavior? Martin Maechler, ETH Zurich

Re: [Rd] Change in the RNG implementation?

2012-10-20 Thread Martin Maechler
27;t think the old algorithm is available, but perhaps it could be > made available by an optional parameter. I do think we should ideally add such an option or probably rather allow the more thorough way of either using RNGversion(..) or something similar to set sample()'s be

Re: [Rd] suppress *specific* warnings?

2012-10-21 Thread Martin Morgan
On 10/21/2012 12:28 PM, Ben Bolker wrote: Not desperately important, but nice to have and possibly of use to others, is the ability to suppress specific warnings rather than suppressing warnings indiscriminately. I often know of a specific warning that I want to ignore (because I know that's

Re: [Rd] suppress *specific* warnings?

2012-10-23 Thread Martin Morgan
On 10/22/2012 09:57 AM, luke-tier...@uiowa.edu wrote: On Sun, 21 Oct 2012, Martin Morgan wrote: On 10/21/2012 12:28 PM, Ben Bolker wrote: Not desperately important, but nice to have and possibly of use to others, is the ability to suppress specific warnings rather than suppressing

Re: [Rd] suppress *specific* warnings?

2012-10-25 Thread Martin Maechler
... in your environment if you are US, UK or similarly based. Indeed, a *really* dangerous practice. Martin Maechler, ETH Zurich >>>>> Martin Morgan >>>>> on Tue, 23 Oct 2012 05:28:48 -0700 writes: > On 10/22/2012 09:57 AM, luke-tier...@uiowa.edu wro

[Rd] parallel::pvec FUN types differ when v is a list; code simplifications?

2012-10-25 Thread Martin Morgan
lelism of parLapply. Someone was working on some more robust and convenient wrappers around mclapply. Did that ever see the light of day? If you are referring to http://thread.gmane.org/gmane.science.biology.informatics.conductor/43660 in which I had offered some small changes to parallel::

<    10   11   12   13   14   15   16   17   18   19   >