Although this query was inspired by distributed random number
generation, one of the questions (#2 below) is a single-machine issue.
I call C++ code from R to generate simulated data. I'm doing this on a
cluster, and use rmpi and rsprng. While rsprng randomizes R-level
random numbers (e.g.,
On Sat, 2007-06-30 at 14:50 -0500, Dirk Eddelbuettel wrote:
On 30 June 2007 at 12:12, Ross Boylan wrote:
| I call C++ code from R to generate simulated data. I'm doing this on a
| cluster, and use rmpi and rsprng. While rsprng randomizes R-level
| random numbers (e.g., from runif), it has
produced a flat straight line.
There are also a bunch of other tweaks I want to make to get output
presentation ready. Is it time to try ggplot2? I found I could get
results very quickly with ggplot, but am not sure how much control it
gives me over the finer details.
Thanks.
--
Ross Boylan
in there that might be relevant, but at first blush many of them
are embedded in other concepts (grobs, shingles, rugs) and don't
obviously solve the problem.
I know this is not a hard thing to program, but I suspect someone has
already done it. Any pointers?
Thanks.
--
Ross Boylan
Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ross Boylan
Sent: Friday, 8 December 2006 8:03 a.m.
To: r-help
Subject: [R] making a grid of points
I'd like to evaluate a function at each point on a 2 or 3-D
grid. Is there some function that already does
way around it?
--
Ross Boylan wk: (415) 514-8146
185 Berry St #5700 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax: (415) 514-8150
University of California, San Francisco
San Francisco, CA 94107-1739
this with expect, but I'm hoping
for something simpler. Potentially, I could make the script itself act
differently on the head node (the only one I want to debug right now),
including changing the redirection there.
--
Ross Boylan wk: (415) 514-8146
185 Berry St
On Wed, 2005-11-23 at 10:49 +0100, Uwe Ligges wrote:
Ross Boylan wrote:
P.S. Previous list postings advised that R CMD install was a better way
to produce binaries than R CMD build --binary. The former command
doesn't seem to have any options for making binaries; has that facility
is that .Rbuildignore is only read in the
package root directory, and will have no effect below that. Is that
correct? Per directory .Rbuildignore's would be convenient..
--
Ross Boylan wk: (415) 514-8146
185 Berry St #5700 [EMAIL
as a shell script? Something else?
Is there any kind of assumption I can make portably?
I realize I could generate the file from a configure script, but I'd
like to avoid doing special purpose code that this case would require.
Thanks.
--
Ross Boylan wk: (415
---
Is this a bug, or am I missing something? Note that \bf\beta seems to
have been doubled.
Currently on R 2.2.0.final-4 on Debian. I think I've seen this with
many prior versions too.
--
Ross Boylan wk: (415) 514-8146
185 Berry St #5700
On Thu, 2005-08-18 at 17:30 -0500, Paul Roebuck wrote:
On Thu, 18 Aug 2005, Ross Boylan wrote:
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
argument from matched by
multiple actual arguments
The FAQ says, in the section on differences between R and S,
R disallows repeated formal arguments in function calls.
That seems a perfectly reasonable rule, but how do I handle this
situation?
--
Ross Boylan wk
can tell, the Green Book doesn't talk about a contains
argument to setClass.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
University
, representation=representation(A, extra=numeric),
contains=A)
?
As far as I can tell, the Green Book doesn't talk about a contains
argument to setClass.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept
On Wed, 2005-06-08 at 14:15 +0200, Thomas Petzoldt wrote:
...
Hello Ross,
I see that your question was related to S4, but I just noticed a
solution based on the R.oo package so I thought I would add a solution
based on the proto package too. We had similar problems several times
ago and (to
On Wed, 2005-06-08 at 09:13 +0200, Uwe Ligges wrote:
[extensive deletions. Discussion concerned my desire to have a function change
the value
of an object in a way that had effects outside of the function, without
returning the object.]
You have to think about scoping rules and it
will be
of taste.
There are actually two related issues on that score: first, whether the
complex of expectation set up by talking about objects and classes
are met by what R/S does, and second the wisdom of what R/S does in its
own right.
Cheers,
Bert
--
Ross Boylan
On Tue, 2005-06-07 at 08:36 +0200, Uwe Ligges wrote:
Ross Boylan wrote:
On Sat, Jun 04, 2005 at 07:08:56PM +0200, Martin Maechler wrote:
Ross nextPath - function(pm){ #pm is a CompletePathMaker
Ross[EMAIL PROTECTED] - [EMAIL PROTECTED](1)
Ross [etc]
If your nextPath
Apparently using an existing function as the definition for a method is
a no-no (at least as I'm doing it), producing infinite recursion.
setClass(A,
representation(model=ANY)
)
fiddle - function(self) {
1
}
setMethod(fiddle,
signature(self=A),
definition =
I'm puzzled that it seems possible to specify inheritance via the
representation and contains arguments to setClass. The examples
that I've seen all seem to use contains only.
Is there some subtle distinction between these two approaches?
Originally I thought one had to repeat the same
On Tue, 2005-06-07 at 13:49 -0700, Berton Gunter wrote:
Second, in my experiments I couldn't get setReplacementMethod to work:
bumpIndex- - function(pm, value) {
[EMAIL PROTECTED] - [EMAIL PROTECTED](value)
pm
}
# I get an error without the next function definition
On Sat, Jun 04, 2005 at 07:08:56PM +0200, Martin Maechler wrote:
Ross nextPath - function(pm){ #pm is a CompletePathMaker
Ross[EMAIL PROTECTED] - [EMAIL PROTECTED](1)
Ross [etc]
If your nextPath function has 'pm' as its last statement it
will return the updated object,
PROTECTED](1)
[etc]
I'm trying to make the class behave like an iterator, with i keeping
track of its location. I'm sure there are more R'ish ways to go, but
I'm also pretty sure I'm going to want to be able to update slots.
Thanks.
Ross Boylan
__
R
, vector)
and the 2nd signature(Model, matrix, missing).
Among other problems, the lack of identifiers makes the semantics of the
signature obscure in this case.
Basically, would it be advisable to use different generic names for the
two functions listed above?
--
Ross Boylan
On Tue, May 24, 2005 at 07:07:07AM -0400, Duncan Murdoch wrote:
Ross Boylan wrote:
On Mon, 2005-05-23 at 14:41 -0700, Ross Boylan wrote:
Finally, I'm a bit concerned that one article mentioned that S4
inheritance, in practice, is used mostly for data, not methods (Thomas
Lumley, R
On Tue, May 24, 2005 at 06:27:56AM -0700, Robert Gentleman wrote:
Duncan Murdoch wrote:
Ross Boylan wrote:
On Mon, 2005-05-23 at 14:41 -0700, Ross Boylan wrote:
Finally, I'm a bit concerned that one article mentioned that S4
inheritance, in practice, is used mostly for data
, not methods (Thomas
Lumley, R News 4(1), June 2004: p. 36). Am I going down a road I
shouldn't travel?
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax
On Tue, 2005-05-24 at 00:31 +0200, Søren Højsgaard wrote:
One of the things that S3 is lacking is clearly multiple inheritance,
I thought if you wanted C to inherit from A and B you could, in S3,
just
class(aCObject)- c('C', 'A', 'B')
While the ordering is arbitrary, that's usually the case
On Mon, 2005-05-23 at 14:41 -0700, Ross Boylan wrote:
Finally, I'm a bit concerned that one article mentioned that S4
inheritance, in practice, is used mostly for data, not methods (Thomas
Lumley, R News 4(1), June 2004: p. 36). Am I going down a road I
shouldn't travel?
Hmm, maybe I
On Wed, 2004-12-15 at 12:05, Ross Boylan wrote:
libR seems to include a main() function. Should it?
I think I've tracked this down, and it seems to be specific to R 1.9.
The 2.0 libR does not include main.
I believe main is present in 1.9 because the link line for libR includes
a reference
libR seems to include a main() function. Should it?
I'm hoping this simpler question will get more of a response than my
previous post about R a la carte :)
The evidence that libR includes main() is two-fold. First, when I use
nm, I see the _main defined. Second, when I run a program linked
On Thu, 2004-12-09 at 13:15, Ross Boylan wrote:
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
.
By the way, the \newcommand is not global, so I can't use \B (for
example) in later \eqn's.
Using R 2.0.0.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology
? Is it a bug?
Using R 2.0.0-3 on Debian.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
University of California, San Francisco
San Francisco
On Sun, Aug 22, 2004 at 06:58:56PM +0200, Uwe Ligges wrote:
Ross Boylan wrote:
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
? Or should I assume *p points to valid
space (how much?) and fill it in?
Thanks.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
On Fri, 2004-08-20 at 12:04, Thomas Lumley wrote:
On Fri, 20 Aug 2004, Ross Boylan wrote:
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
.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
University of California, San Francisco
San Francisco, CA 94143-0840
On Wed, 2004-03-24 at 08:03, Luke Tierney wrote:
On Tue, 23 Mar 2004, Ross Boylan wrote:
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
I have some more good news and some questions.
On Tue, 2004-03-23 at 20:50, Hao Yu wrote:
Sorry. I have not been able to update Rmpi since the version
0.4-4 on R site.
I don't think any version of Rmpi is on the R site at the moment.
Minor aside: Also, it would be nice if the packages
For the last couple of days when I go to http://cran.us.r-project.org/ I
see only the left-hand margin logo and table of contents. If I click on
one of the links there, I get a timeout. Other sites (e.g.,
http://cran.stat.ucla.edu/) work fine for me.
Lacking complete confidence this is a bug*,
On Tue, 2003-12-30 at 08:39, Shengqiao Li wrote:
Hello:
Anybody knows how to run Rmpi through PBS (Portable Batch System) on a
cluster computer. I'm using a supercomputer which require to submit jobs
to PBS queue for dispatching. I tried use mpirun in my PBS script. But all
my Rslaves are
if the serialize that comes with R 1.8.1 is
compatible with the serialize package? Should the latter be
unnecessary?
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax
On Tue, 2004-03-23 at 17:35, Luke Tierney wrote:
The serialize package should no longer be needed since the
functionality is now in R itself. I haven't run snow with a new
version of Rmpi newer than 0.4-4; with that version things worked on
my systems the last time I tried. We need to revize
process?
Options
---
Is the full set of cluster options documented anywhere?
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
University
On Tue, 2004-03-23 at 18:26, Ross Boylan wrote:
On Tue, 2004-03-23 at 17:35, Luke Tierney wrote:
The serialize package should no longer be needed since the
functionality is now in R itself. I haven't run snow with a new
version of Rmpi newer than 0.4-4; with that version things worked
I just had the interesting experience of building a package and R on
the same system, and having R refuse to load the resultant dynamic
library because it was thought to be for a different system.
The system was non-standard and beta, being a Linux-based 64 bit
Opteron system. It uses the gnu
you go a bit higher).
Is there any thought of relaxing this limitation? I realize doing so
would be a big job. I also realize that 64 bits makes it much less
pressing.
Finally, does S-Plus have the same limitation?
Thanks.
--
Ross Boylan wk: (415) 502-4031
?
Though I was looking at the 1.7.0 version, I just checked 1.8.0 and the
relevant section seems the same.
My ulterior motive is to discover if my understanding of lists is
actually correct :)
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm
On Tue, 2003-11-04 at 13:12, Prof Brian Ripley wrote:
Look into external pointers. That is how we have tackled this, e.g. in
the ts package.
I got the following to work. Any comments? I indicated some areas of
uncertainty in the comments. I'm also unsure about the differences, if
any,
On Fri, 2003-10-31 at 03:14, Prof Brian Ripley wrote:
But I would not be doing R CMD check until I had both installed and
loaded the package and run a few examples.
That's interesting; I thought R CMD check was supposed to be done before
hand. So are you saying the proper development
On Fri, 2003-10-31 at 06:41, A.J. Rossini wrote:
Ross Boylan [EMAIL PROTECTED] writes:
I also added library(survival) to my .First.lib. Is library, rather
than require, the right choice here? I want it to fail if survival
doesn't load.
test the results from require, something like
, Ross Boylan wrote:
On Fri, 2003-10-31 at 03:14, Prof Brian Ripley wrote:
But I would not be doing R CMD check until I had both installed and
loaded the package and run a few examples.
That's interesting; I thought R CMD check was supposed to be done before
hand. So are you
of the second column, though their tops are
not much higher).
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
University of California, San
they don't get out of sync with the
real ones?
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
University of California, San Francisco
San
with the gcc 3.3 toolchain, but obviously it
would be better to solve this portably).
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics fax: (415) 476-9856
: parameter usr couldn't be set in high-level plot() function
4: parameter usr couldn't be set in high-level plot() function
5: parameter usr couldn't be set in high-level plot() function
6
Is this a bug, or have I missed something?
R 1.7.1
--
Ross Boylan wk
On Thu, 2003-10-02 at 16:54, [EMAIL PROTECTED] wrote:
Try
rm(last.warning)
-Original Message-
From: Ross Boylan [mailto:[EMAIL PROTECTED]
Sent: Friday, 3 October 2003 9:10 AM
To: r-help
Subject: [R] Plot can't forget bad parameters
When I give plot some bad paramaters
Thanks to everyone for your help. I decided to see if the session could
be recovered if I connected back from the original, local terminal.
The local screen was locked by the KDE screensaver. Either my unlocking
it, or the passage of time, seems to have got the process unstuck. It
happened
On Mon, 2003-09-29 at 14:25, Luke Tierney wrote:
Look at ?Signal and see if that would help. You may need to rename
the appropriate .RData beforehand to be safer.
luke
For those who follow, note it's actually
?Signals
you want. It talks about USR1 and USR2 (as did some other people in this
I have a hung session I would very much like to recover, since it has
some simulation results I haven't saved (that took about 12 hours to
create). Yes, I know, I should have saved while I had the chance.
I tried to do a hist() in an environment without a plotting device.
My R session now seems
On Mon, Sep 29, 2003 at 05:09:49PM -0400, Ben Bolker wrote:
Can you use save.image() to rescue your results?
I would try save.image(file=salvage.RData) and see if the file
appears. Otherwise I would say you're probably out of luck.
The problem is I can't get back to the command
On Wed, 2003-09-24 at 18:36, Liaw, Andy wrote:
There was a related thread on R-help, probably last year. The question was
getting density() to numerically integrate to 1. The answer is, yes. If
you do fine enough partitions, you will see that it integrates to one. And
yes, a kernel density
1 0
[[9]]
[1] 0 0 0 0 0
[[10]]
[1] 0 0 0 1 0
Browse[1] dim(covs)
[1] 5 2
Browse[1] class(covs)
[1] data.frame
Browse[1] class(m)
[1] list
Browse[1] length(m)
[1] 10
Fortunately, the following seems to work as expected:
Browse[1] m[,1:2] - as.matrix(covs)
Ross Boylan
in the outer function.
This is not only rather ugly, but I imagine it also raises some
performance issues.
All of which has me wondering if there are some more natural ways to use
the language to the same general ends. Can anyone comment?
Thanks.
--
Ross Boylan
Thanks for your response. Is good to know that copying is lazy, but I
don't think that fully solves my problems. See below.
On Thu, 2003-09-11 at 17:40, Thomas Lumley wrote:
.
you see that unpacking b from a didn't result in a copy, and that b must
just be a reference to a$m. When b is
packages; clearly that wouldn't be an option if working with one of the
automatically loaded packages).
Thanks.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED]
Dept of Epidemiology and Biostatistics
I want to do a logistic regression without an intercept term. This
option is absent from glm, though present in some of the inner functions
glm uses. I gather glm is the standard way to do logistic regression in
R.
Hoping it would be passed in, I said
r -
I am getting an error that I don't understand, and wonder if anyone
could explain what's going on. I call a function defined thus:
clogit.rds-function(formula,data,extra.data,response.prob,
na.action=getOption(na.action),subset=NULL,
control=coxph.control()){
On Fri, 2003-08-15 at 16:03, Ross Boylan wrote:
I am getting an error that I don't understand, and wonder if anyone
could explain what's going on. I call a function defined thus:
clogit.rds-function(formula,data,extra.data,response.prob,
na.action=getOption(na.action
On Fri, 2003-08-15 at 16:15, Ross Boylan wrote:
On Fri, 2003-08-15 at 16:03, Ross Boylan wrote:
I am getting an error that I don't understand, and wonder if anyone
could explain what's going on. I call a function defined thus:
clogit.rds-function(formula,data,extra.data,response.prob
On Thu, 2003-07-17 at 14:27, Spencer Graves wrote:
Have you considered optim?
spencer graves
Thank you for drawing that to my attention. I take it that's the best general
purpose optimizer to use?
My hope is to find something that knows a bit more about the structure of the
problem,
On Thu, 2003-07-17 at 14:37, Peter Dalgaard BSA wrote:
Ross Boylan [EMAIL PROTECTED] writes:
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
On Thu, 2003-07-17 at 15:06, Peter Dalgaard BSA wrote:
Ross Boylan [EMAIL PROTECTED] writes:
This leads to a general search question: is there a way I could have
done a search on conditional logit and found this?
In R itself, probably not. The CRAN search engine at
http
that and you must intervene to achieve
dynamic scoping--was obvious to the authors. It just wasn't obvious to
me. Since I'm still not sure, I thought I'd check.
Thanks.
--
Ross Boylan wk: (415) 502-4031
530 Parnassus Avenue (Library) rm 115-4 [EMAIL PROTECTED
On Tue, 2003-06-03 at 16:34, Robert Gentleman wrote:
Also, note that you can get the effect of lexical scope by doing
things like
Do you mean you can get the effects of dynamic scope?
f- function(x) x+y
e1 - new.env()
assign(y, 10, env=e1)
environment(f) - e1
#now like lexical
77 matches
Mail list logo