Displaying 20 results from an estimated 7000 matches similar to: "Request to review a patch for rpart"
2017 Jun 06
2
Usage of PROTECT_WITH_INDEX in R-exts
On 06.06.2017 10:07, Martin Maechler wrote:
>>>>>> Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch>
>>>>>> on Mon, 5 Jun 2017 17:30:20 +0200 writes:
> > Hi I've noted a minor inconsistency in the documentation:
> > Current R-exts reads
>
> > s = PROTECT_WITH_INDEX(eval(OS->R_fcall, OS->R_env), &ipx);
2017 Jun 09
1
Usage of PROTECT_WITH_INDEX in R-exts
>>>>> Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch>
>>>>> on Thu, 8 Jun 2017 12:55:26 +0200 writes:
> On 06.06.2017 22:14, Kirill M?ller wrote:
>>
>>
>> On 06.06.2017 10:07, Martin Maechler wrote:
>>>>>>>> Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch> on
2014 Feb 11
2
$new cannot be accessed when running from Rscript and methods package is not loaded
Hi
Accesses the $new method for a class defined in a package fails if the
methods package is not loaded. I have created a test package with the
following single code file:
newTest <- function() {
cl <- get("someClass")
cl$new
}
someClass <- setRefClass("someClass")
(This is similar to code actually used in the testthat package.)
If methods is not loaded,
2017 Jun 05
2
Usage of PROTECT_WITH_INDEX in R-exts
Hi
I've noted a minor inconsistency in the documentation: Current R-exts reads
s = PROTECT_WITH_INDEX(eval(OS->R_fcall, OS->R_env), &ipx);
but I believe it has to be
PROTECT_WITH_INDEX(s = eval(OS->R_fcall, OS->R_env), &ipx);
because PROTECT_WITH_INDEX() returns void.
Best regards
Kirill
2015 Feb 09
3
xtabs and NA
Hi
I haven't found a way to produce a tabulation from factor data with NA
values using xtabs. Please find a minimal example below, it's also on
R-pubs [1]. Tested with R 3.1.2 and R-devel r67720.
It doesn't seem to be documented explicitly that it's not supported.
From reading the code [2] it looks like the relevant call to table()
doesn't set the "useNA"
2014 Aug 18
0
patch for rpart
On 08/14/2014 05:00 AM, r-devel-request at r-project.org wrote:
> Dear list
>
>
> For my work, it would be helpful if rpart worked seamlessly with an
> empty model:
>
> library(rpart); rpart(formula=y~0, data=data.frame(y=factor(1:10)))
>
> Currently, an unrelated error (originating from na.rpart) is thrown.
>
> At some point in the near future, I'd like to
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
2016 Apr 19
3
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Thanks for looking into it, your approach sounds good to me. See also
R_has_methods_attached()
(https://github.com/wch/r-source/blob/42ecf5f492a005f5398cbb4c9becd4aa5af9d05c/src/main/objects.c#L258-L265).
I'm fine with Rscript not loading "methods", as long as everything works
properly with "methods" loaded but not attached.
-Kirill
On 19.04.2016 04:10, Michael
2016 May 09
2
R process killed when allocating too large matrix (Mac OS X)
On 05/05/2016 10:11, Uwe Ligges wrote:
> Actually this also happens under Linux and I had my R processes killed
> more than once (and much worse also other processes so that we had to
> reboot a server, essentially).
I found that setting RLIMIT_AS [1] works very well on Linux. But this
requires that you cap memory to some fixed value.
> library(RAppArmor)
> rlimit_as(1e9)
>
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
2016 Apr 19
2
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
See also .isMethodsDispatchOn, which is what trace uses to decide if the
methods package needs to be loaded.
~G
On Tue, Apr 19, 2016 at 5:34 AM, Michael Lawrence <lawrence.michael at gene.com
> wrote:
> Not sure why R_has_methods_attached() exists. Maybe Martin could shed
> some light on that.
>
> On Mon, Apr 18, 2016 at 11:50 PM, Kirill M?ller
> <kirill.mueller at
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
2016 Apr 19
4
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Does it make sense to be able to load an S4 object without the methods
package being attached? I'm not sure implementation-wise how easy this
would be, but it seems like any time there is an S4 object around, the
methods package should be available to deal with it.
~G
On Tue, Apr 19, 2016 at 7:34 AM, Michael Lawrence <lawrence.michael at gene.com
> wrote:
> Right,
2016 Mar 10
2
getParseData() for installed packages
I can't seem to reliably obtain parse data via getParseData() for
functions from installed packages. The parse data seems to be available
only for the *last* file in the package.
See [1] for a small example package with just two functions f and g in
two files a.R and b.R. See [2] for a documented test run on installed
package (Ubuntu 15.10, UTF-8 locale, R 3.2.3). Same behavior with
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
2016 Apr 18
3
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Scenario: An S3 method is declared for an S4 base class but called for
an instance of a derived class.
Steps to reproduce:
> Rscript -e "test <- function(x) UseMethod('test', x); test.Matrix <-
function(x) 'Hi'; MatrixDispatchTest::test(Matrix::Matrix())"
Error in UseMethod("test", x) :
no applicable method for 'test' applied to an
2016 Dec 16
2
Upgrading a package to which other packages are LinkingTo
Hi
I'd like to suggest to make R more informative when a user updates a
package A where there's at least one package B that has "LinkingTo: A"
in its description.
To illustrate the problem, assume package A is updated so that its C/C++
header interface (in inst/include) is changed. For package B to pick up
these changes, we need to reinstall package A. In extreme cases, if
2016 May 12
3
R process killed when allocating too large matrix (Mac OS X)
>>>>> Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch>
>>>>> on Wed, 11 May 2016 10:42:56 +0200 writes:
> My ulimit package exposes this API ([1], should finally submit it to
> CRAN); unfortunately this very API seems to be unsupported on OS X
> [2,3]. Last time I looked into it, neither of the documented settings
> achieved
2015 Feb 27
2
static pdf vignette
Dear all,
In my package I have a computational expensive Rnw file which can't pass R CMD check. Therefore I set eval=FALSE in the Rnw file. But I would like to have the pdf vignette generated by the Rnw file with eval=TRUE. It seems to me a static pdf vignette is an option. Any suggestions on this?
Thanks,
Zhu Wang
**Connecticut Children's Confidentiality Notice**
This e-mail
2014 Mar 14
1
Detect a terminated pipe
Hi
Is there a way to detect that the process that corresponds to a pipe has
ended? On my system (Ubuntu 13.04), I see
> p <- pipe("true", "w"); Sys.sleep(1); system("ps -elf | grep true |
grep -v grep"); isOpen(p)
[1] TRUE
The "true" process has long ended (as the filtered ps system call emits
no output), still R believes that the pipe p is
2017 Jun 08
0
Usage of PROTECT_WITH_INDEX in R-exts
On 06.06.2017 22:14, Kirill M?ller wrote:
>
>
> On 06.06.2017 10:07, Martin Maechler wrote:
>>>>>>> Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch>
>>>>>>> on Mon, 5 Jun 2017 17:30:20 +0200 writes:
>> > Hi I've noted a minor inconsistency in the documentation:
>> > Current R-exts reads
>>
2014 Aug 07
1
UTC time zone on Windows
Hi
I'm having trouble running R CMD build and check with UTC time zone
setting in Windows Server 2012. I can't seem to get rid of the following
warning:
unable to identify current timezone 'C':
please set environment variable 'TZ'
However, setting TZ to either "Europe/London" or "GMT Standard Time"
didn't help.
It seems to me that the
2003 Apr 16
2
Jackknife and rpart
Hi,
First, thanks to those who helped me see my gross misunderstanding of
randomForest. I worked through a baging tutorial and now understand the
"many tree" approach. However, it is not what I want to do! My bagged
errors are accpetable but I need to use the actual tree and need a single
tree application.
I am using rpart for a classification tree but am interested in a more
unbaised
2013 Dec 12
2
Strategies for keeping autogenerated .Rd files out of a Git tree
Hi
Quite a few R packages are now available on GitHub long before they
appear on CRAN, installation is simple thanks to
devtools::install_github(). However, it seems to be common practice to
keep the .Rd files (and NAMESPACE and the Collate section in the
DESCRIPTION) in the Git tree, and to manually update it, even if they
are autogenerated from the R code by roxygen2. This requires extra