similar to: Rprof and setMethod conflict (PR#1949)

Displaying 20 results from an estimated 3000 matches similar to: "Rprof and setMethod conflict (PR#1949)"

2002 Jul 19
1
Rprof and setMethod conflict?
I noticed this oddity about R profiling and setMethod. First, I "test out" Rprof. > require(methods) Loading required package: methods [1] TRUE > > Rprof("test.out") > data.frame("a") X.a. 1 a > Rprof(NULL) So far, so good. Next, I define myClass. > setClass("myClass", representation(mySlot = "numeric")) [1]
2002 Aug 07
0
FW: [R] [ and setMethod conflict?
John Chambers suggested that I forward this thread (first posted to r-help) along to r-devel... Thanks, Kevin -----Original Message----- From: John Chambers [mailto:jmc@research.bell-labs.com] Sent: Tuesday, August 06, 2002 6:31 PM To: Bartz, Kevin Cc: r-help@stat.math.ethz.ch Subject: Re: [R] [ and setMethod conflict? Definitely something funny going on, but perhaps a little less sweeping
2002 Aug 06
2
[ and setMethod conflict?
I noticed this oddity about [ and setMethod. First, I define testFunc, which sorts a data frame by the first column and returns the entries that aren't NAs, and testIt, which runs testFunc repeatedly on a random large data frame, each time saving the return into a dummy placeholder (for demonstration's sake). > require(methods) Loading required package: methods [1] TRUE > testFunc
2002 Aug 06
2
[ and setMethod conflict?
I noticed this oddity about [ and setMethod. First, I define testFunc, which sorts a data frame by the first column and returns the entries that aren't NAs, and testIt, which runs testFunc repeatedly on a random large data frame, each time saving the return into a dummy placeholder (for demonstration's sake). > require(methods) Loading required package: methods [1] TRUE > testFunc
2003 Mar 26
0
Rprof/UseMethod
I'm having difficulty with Rprof. I have a documentation example test.qss that runs fine without profiling, but under Rprof, > Rprof() > source("test.qss") Error in standardGeneric("model.matrix") : UseMethod used in an inappropriate fashion Luke wrote about a similar circumstance last summer: # From: Luke Tierney (luke@stat.umn.edu) # Date: Fri Jul
2011 Oct 22
1
setMethod "[" - extract by names within Slot
Hi R-helper! I have problem with setMethods for "[". Here is example : setClass("myClass", representation(ID.r = "numeric", ID.c = "character", DAT = "matrix")) to.myClass <- function(ID.r, ID.c, DAT) {     out <- new("myClass", ID.r = ID.r, ID.c = ID.c, DAT = DAT)     return(out)       }       setMethod("[",
2004 Jan 29
2
Object validation and formal classes
I'm using R 1.8.1 (Win32, Linux) and have some difficulties using validation functions for S4 classes. The problem is if I specify a validation function with setValidity("myclass", validate.myclass) object validation is only performed when I create an instance using new("myclass"), or when I explicitly call validObject(x) where x is of class "myclass", of
2008 Mar 20
1
setMethod for "["
Hi R-Help, Please consider the following simple case: I have a class like setClass("myClass", representation(x="matrix", y="character")) and I would like to use the method *"["* for a *myClass* objects (but changing the default *drop* argument from TRUE to FALSE): setMethod("[","myClass", function(x,i,j,...,drop=FALSE)
2003 Dec 02
1
setMethod("min", "myclass", ...)
Hello, I have defined a new class > setClass("myclass", representation(min = "numeric", max = "numeric")) and want to write accessor functions, so that for > foo = new("myclass", min = 0, max = 1) > min(foo) # prints 0 > max(foo) # prints 1 At first i created a generic function for "min" > setGeneric("min",
2004 May 13
0
Rprof ignores top-level computation (PR#6883)
Full_Name: John Garvin Version: 1.9.0 OS: Linux Submission from: (NULL) (128.42.129.78) This may or may not technically be a bug, but it's certainly an annoyance. Rprof only takes into account computation that occurs inside functions. If a time-consuming operation occurs outside a function, it doesn't record the time it takes. Consider this program 'array.r': Rprof() foo <-
2010 Sep 23
0
R CMD Rprof --help suggestion
Hi, >From reading ?Rprof, I checked R CMD Rprof --help and learned that there are options to specify the min % to print. This is currently (R-devel r52975) displayed with the --help option as --min%total minimum % to print for 'by total' --min%self minimum % to print for 'by self' So I tried R CMD Rprof --min%total 5 and got an error. After looking at
2009 Jun 12
1
Rprof loses all system() time
Rprof seems to ignore all time spent inside system() calls. E.g., this simple example actually takes about 10 seconds, but Rprof thinks the total time is only 0.12 seconds: > Rprof("sleep-system.out") ; system.time(system(command="sleep 10")) ; Rprof(NULL) user system elapsed 0.000 0.004 10.015 > summaryRprof("sleep-system.out")$by.total
2004 Oct 19
0
Question on Rprof(); was: Re: sapply and loop
Yes. It should have something to do with read/write permissions, but it is not clear how it happens. I can write file to C drive using R. I usually write my results matrix to a txt file in C drive. For Rprof(), the boot.out file can be created, but only with one line sample.interval=20000 The situation is the same even if I specify the directory to the D drive,where I have the full
2007 Mar 31
1
Probem with argument "append" in "Rprof"
Hello, Appending information to the profiler's output seems to generate problems. Here is a small example of code : <code r> require(boot) Rprof( memory.profiling = TRUE) Rprof(NULL) for(i in 1:2){ Rprof( memory.profiling = TRUE, append = TRUE) example(boot) Rprof(NULL) } </code> The problem is that the file Rprof.out contains more than once the header information: $ grep
2005 Feb 16
0
Profiling R code and C code (Rprof and gprof)
Hi, I have searched R mail list archive and couldn't find my answers. The R extension describes how to make use of Rprof to profile R code. gprof can be also used for the same purpose for the C codes when the C codes are written independently and provided with a main() function. I'm currently writing R codes meshed with C Codes, and use .Call as the interface between the two parts.
2001 Oct 23
2
Possible bug, Rprof() and scan(pipe()) (PR#1140)
This looks like a bug? Unable to use scan(pipe()) while profiling. I have no idea whether this version of R violates the "do not use `Rprof' in an executable built for profiling" warning in ?Rprof. Thanks -Don > version _ platform powerpc-apple-darwin1.4 arch powerpc os darwin1.4 system powerpc, darwin1.4 status Patched major 1 minor 3.1 year
2012 Dec 11
1
Rprof causing R to crash
I'm trying to use Rprof() to identify bottlenecks and speed up a particullary slow section of code which reads in a portion of a tif file and compares each of the values to values of predictors used for model fitting. I've written up an example that anyone can run. Generally temp would be a section of a tif read into a data.frame and used later for other processing. The first portion
2006 Sep 22
1
setMethod
Hello R-help: I was hoping someone could help me understand a particular function i came across in a package: "$.myClass" <- function( x, name ) { sym = paste( "foo", name, sep = "_" ) if( is.loaded(sym) ) .Call(sym,x) } I understand the paste, and .Call part, but I'm not sure how this function would get called? What exactly is
2002 Jun 11
2
Puzzled by what Rprof is telling me
I am using Rprof() to help find ways to improve performance. I found a function whose total seconds and self seconds were large. I replaced it with something else. The something else had a small number of total seconds and self seconds. But the total time did not decrease. I don't understand how that could be, and would appreciate any suggestions. Thanks -Don Details, unfortunately
2005 Jan 20
0
Interpreting Rprof output
Hello! I have run Rprof on a function of mine and the results look very strange, to say the least. At the end I of this email is an output of summaryRprof. Can someone help me interpret this output? I have read the appropriate section in the manual "Writing R Extensions" and help pages. If I understand this output correctly, it is saying that "unlist" has been active in