On 03/10/2011 08:21 AM, ONKELINX, Thierry wrote:
> Dear all,
>
> I'm writing a package and I would like to reuse the residuals()
> function. When I use a function which calls the redefined residuals
> (for my custom class) I get an error (see below). It looks like the
> wrong method is used. The s
Simon pointed out that the issue I observed was due to internal
behaviour of unique.matrix.
I had looked carefully at the manual pages before posting the question
and this was not mentioned. Perhaps an addition could be made?
Terry T.
__
R-devel@r-p
There is a virtual class "refClass" that all reference classes subclass,
so is(x, "refClass") is the natural test, as in:
> foo <- setRefClass("foo", fields = "bar")
> x <- foo$new()
> is(x, "refClass")
[1] TRUE
On 3/10/11 7:40 AM, Jeffrey Horner wrote:
Hi all,
I've constructed the following
Hi,
thanks to both of you. My use case was actually to in-the-end create
a *list* in a cut'n'paste-friendly way, e.g.
env <- function(..., hash=FALSE, parent=parent.frame(), size=29L) {
envir <- new.env(hash=hash, parent=parent, size=size);
evalq(..., envir=envir);
envir;
} # env()
x <-
Dear all,
I'm writing a package and I would like to reuse the residuals() function. When
I use a function which calls the redefined residuals (for my custom class) I
get an error (see below). It looks like the wrong method is used. The strange
this is, that when it execute the code manually it
Hi all,
I've constructed the following function to test whether or not an
object was created from a reference class:
isRefClassObject <- function(x) isS4(x) &&
is.environment(attr(x,'.xData')) &&
exists('.refClassDef',attr(x,'.xData'))
but I'm unsure if it's a complete test or if there's a bette
On 3/10/11, Henrik Bengtsson wrote:
> Hi,
>
> I've just created:
>
> newEnvEval <- function(..., hash=FALSE, parent=parent.frame(), size=29L) {
> envir <- new.env(hash=hash, parent=parent, size=size);
> evalq(..., envir=envir);
> envir;
> } # newEnvEval()
>
> so that I can create an environm
On 9 March 2011 at 14:34, Adam D. I. Kramer wrote:
| If I have a cluster of heterogenous machines, each with their own
| self-optimized ATLAS, do I need to compile R on each machine to tell it to
| take advantage of the local ATLAS? Or is it sufficient to compile R once
| with the appropriat
I need read a table in a string with special format. I used read.csv and
textConnection function.
But i am confuse about textConnection by follow code.
case A: It is OK£¡
str0 <- '{"abc",{"def","X,1&Y,2&Z,3"}}'
str1 <- strsplit(str0,'"')[[1]][6]
str2 <- gsub("&","\n", str1)
con <- textC
It should be possible to run unique()/duplicated() column by column
and incrementally update the set of unique/duplicated rows. This
would avoid any coercing. The benefit should be even greater for
data.frame():s.
My $.02
/Henrik
On Thu, Mar 10, 2011 at 12:29 AM, Petr Savicky wrote:
> On Wed,
On Wed, Mar 09, 2011 at 02:11:49PM -0500, Simon Urbanek wrote:
> match() is a red herring here -- it is really a very specific thing that has
> to do with the fact that you're running unique() on a matrix. Also it's much
> easier to reproduce:
>
> > x=c(1,1+0.2e-15)
> > x
> [1] 1 1
> > sprintf("
11 matches
Mail list logo