similar to: R does in memory analysis only?

Displaying 20 results from an estimated 5000 matches similar to: "R does in memory analysis only?"

2005 Aug 18
2
Use of contains in S4 classes
setClass("B", representation=representation("B", extra="numeric)) setClass("B", representation=representation(extra="numeric"), contains="B") Are these the same? If not, how do they differ? What about setClass("B", representation=representation("B", extra="numeric"), contains="B") ? As far as I can
2005 Jun 02
1
Too generic with S4 methods?
I tried the following (relevant excerpt only) setMethod("likelihood", signature(spec="Specification", covs="vector", states="vector"), function(spec, covs, states) { #### setMethod("likelihood", signature(model="Model", path="matrix"), function(model, path) { This
2003 Oct 30
4
packaging a package addon
I am trying to package some code that is a tweak to the survival package. When I asked earlier, the list consensus was that it would be best to do this as a separate package, dependent on survival. This is proving a bit tricky. I have some run-time and compile time concerns. Run-time, my R code needs R code from survival, and my C code needs C functions from survival. Will this all be
2005 Jun 04
3
How to change the value of a class slot
I defined an S4 class with a slot i. Then I wrote a regular function that attempted to increment i. This didn't work, apparently because of the general rule that a function can't change the values of its arguments outside the function. I gather there are ways around it, but the Green book admonishes "cheating on the S evaluation model is to be avoided" (p. 190). Thinking that
2004 Feb 11
1
how much memory? was: R does in memory analysis only?
Is there a way to tell how much memory the computer running R has? -Frank -----Original Message----- From: David Smith [mailto:dsmith at insightful.com] Sent: Monday, February 09, 2004 1:32 PM To: Ross Boylan Cc: r-help Subject: RE: [R] R does in memory analysis only? Ross Boylan writes: > R works only on problems that fit into (real or virtual) memory. > ... does S-Plus have the same
2003 Oct 02
2
Plot can't forget bad parameters
When I give plot some bad paramaters, it keeps giving me error messages forever after. I think the last time this happened, I even got the error messages for completely unrelated, non-graphical functions. Here's a recent example: > plot(it[[31]][,c(1, 3)], type="b", usr=c(0, 20, -20, 5)) Warning messages: 1: parameter "usr" couldn't be set in high-level plot()
2003 Jul 17
3
Looking to maximize a conditional likelihood
I want to maximize a conditional likelihood function that is basically logistic conditional on the number of successes within strata. What would be a good starting place for this? A complication is that the denominator includes a term that is the sum over all permutations. Although there is no time dimension to the problem, it's possible a degenerate use of the Cox proportional hazards
2005 May 23
2
Documentation of S3 and S4 classes, inheritance
I'd like to have a class A that computes a likelihood, and a subclass B that computes the same likelihood by sometimes throws in an additional term (B includes measurement error). So B's likelihood needs to call A's, and then (sometimes) multiply by an additional term. It sounds as if, in the S3 scheme, NextMethod is supposed to do this: like.A <- function(stuff) compute value
2004 Aug 20
2
Error messages and C
I am calling a C (C++ really) function via the .C interface. Sometimes when things go wrong I want to return an error message. 1. R provides C functions error and warning which look about right. But exactly how does this exit, and in particular what happens with cleaning up, calling C++ destructors, and unwinding the stack? Will I get memory leaks? 2. Before I discovered those functions, I
2003 May 06
1
Seeking packaging advice
I have 3 questions about creating a package for R, and would appreciate any guidance. 1. Demonstrating the packaged code requires some support code files. It would seem natural to put these in the demo directory, but "Writing R extensions" says files in demo should be suitable for runing from demo(). The support files are not intended to be run from the top level. How should I handle
2003 Nov 05
1
Contributing to the R Extensions documentation
I thought there were some gaps in the R Extensions document; in particular, I was left wondering how to create a list. I think a paragraph on it would be useful. I would be happy to contribute the paragraph, but I'm not sure if there's interest or what the procedure is. Can anyone advise me? Though I was looking at the 1.7.0 version, I just checked 1.8.0 and the relevant section seems
2005 Aug 18
1
problem with repeated formal arguments and ...
I want to add an argument if it is not present. Following the Green Book, p. 337: test <- function(x, ...){ dots <- list(...) if (!hasArg(from)) from <- 0 else from <- dots$from curve(x, from=from, ...) } > test(sin) > test(sin, from=4) Error in curve(x, from = from, ...) : formal argument "from" matched by multiple actual arguments The FAQ says, in
2004 Mar 24
1
snow documentation comments
There are a few points I found unclear or unmentioned in the snow documentation (mostly I looked at the cluster.html web page). I thought I'd mention them here. What is the start up environment for the children? -------------------------------------------------- My best guess at the answer is in parentheses Do they inherit shell variables? (no) Do they inherit variables set in R or other
2003 Sep 12
1
glitch in terms documentation (PR#4146)
These are two small items that caught my eye. I'm looking at the R 1.7.1 2003-06-16 pdf reference manual. There are several refences to terms.default (e.g., p. 711, 712) but no definitions of it. I'm guessing this means terms, but it's a little puzzling. Also, the desription of terms.object does not mention that the "variables" attribute is actually a list of
2002 Apr 05
1
randomForest() segfaults under Solaris(SPARC) 2.7
Invocation of randomForest() using the iris example in the help file crashes R with a segmentation fault. This happens on all of our ultraSPARC machines running Solaris 2.7. We're using R-1.4.1, compiled using Sun cc and f77 and the flags: CC=cc CFLAGS="-xO5 -xlibmil -dalign" FC=f77 FFLAGS="-xO5 -xlibmil -dalign" "make check" runs withour errors, and R has been
2004 Dec 09
1
Calling R a la carte?
I have written an R package, mostly implemented in C++. It works. I want to do unit tests of the C++ code, as well as higher level tests from R. I use the boost test framework for this, part of which is a library which wants to be the thing that starts everything running (i.e., main). My code has a few invocations of R functions--just error at the moment, I think. The list might grow. So I
2004 Aug 20
1
R CMD check testing environment
I can't tell from the docs ("Writing R Extensions" 1.9.1) exactly what environment the tests, examples, and vignettes that R CMD check tries to run are in. In particular: 1) how do I get the package loaded? 2) how do I access data in the data/ directory? 3) where is the material in the other directories? (e.g., has inst/ material been installed? where?) Apparently (section 1.3)
2003 Jun 03
2
Question about looking up names
I think I now understand how R looks up names. Could anyone tell me if I have this right? First it looks up the nested environments created by lexical scoping. Then, if it gets to the top (.GlobalEnv) it also looks through the list of things that have been "attach"ed. It never looks in the call stack unless you explicitly ask it to, or mess with the environment frames. The reason I
2003 Nov 04
1
Architecting an optimization with external calls
I have a likelihood I would like to compute using C++ and then optimize. It has data that need to persist across individual calls to the likelihood. I'd appreciate any recommendations about the best way to do this. There are several, related issues. 1. Use the R optimizer or a C optimizer? Because of the persistence problems (see below), using a C optimizer has a certain attraction.
2003 Aug 26
2
Seeking Packaging advice
I have two questions about packaging up code. 1) Weave/tangle advisable? In the course of extending some C code already in S, I had to work out the underlying math. It seems to me useful to keep this information with the code, using Knuth's tangle/weave type tools. I know there is some support for this in R code, but my question is about the wisdow of doing this with C (or Fortran, or other