Hello all,
I am converting some C code into a package for R and wondered what the
proper way of handling time_t types from C in R was. time_t is a typedef
for long, but R seems to only deal in Integers or Reals, so what is the
proper way of handling time in an R to C conversion ( or visa ve
On Tue, 26 Sep 2006, Bill Dunlap wrote:
> On Mon, 25 Sep 2006 [EMAIL PROTECTED] wrote:
>
>> On Mon, 25 Sep 2006, [EMAIL PROTECTED] wrote:
>> ...
>>> sprintf("\p") doesn't show the backslash, this occurs with all strings that
>>> start with certain letters. There is however no explanation to this
colnames on a data.frame with implicit row.names
> df <- data.frame(x=1:600)
is slow
> system.time(colnames(df))
[1] 21.655 0.327 21.987 0.000 0.000
> system.time(names(df))
[1] 0 0 0 0 0
because colnames calls dimnames calls row.names.data.frame calls
as.character on the implicit row.na
On Wed, 27 Sep 2006, Martin Morgan wrote:
> colnames on a data.frame with implicit row.names
>
>> df <- data.frame(x=1:600)
>
> is slow
>
>> system.time(colnames(df))
> [1] 21.655 0.327 21.987 0.000 0.000
>> system.time(names(df))
> [1] 0 0 0 0 0
>
> because colnames calls dimnames calls ro
Yes, obviously, with hindsight. In lieu of code change, the colnames
documentation could indicate the restricted sense of 'equivalent'.
For a data frame, 'rownames' and 'colnames' are equivalent to
'row.names' and 'names' respectively.
It might help to add 'names' to See Also of ?data.fr
On Wed, 27 Sep 2006, Tom McCallum wrote:
> Hello all,
>
> I am converting some C code into a package for R and wondered what the
> proper way of handling time_t types from C in R was. time_t is a typedef
> for long, but R seems to only deal in Integers or Reals, so what is the
> proper way of han
There is a point that needs to be remembered in discussions of accessor
functions (and more generally).
We're working with a class/method mechanism in a _functional_ language.
Simple analogies made from class-based languages such as Java are not
always good guides.
In the example below, "a fu
Ok, moved to R-devel.
I tried to build R-2.3.1. Since I intent to distribute this tuned R to
all other who have a computer like mine here at work I thought it was
best to stay with the latest stable release.
About your suggestion, I could'n find xerblas.o file. And I don't know
how to edit libf77
On Wed, 27 Sep 2006, Giuseppe Antonaci wrote:
> Ok, moved to R-devel.
>
> I tried to build R-2.3.1. Since I intent to distribute this tuned R to
> all other who have a computer like mine here at work I thought it was
> best to stay with the latest stable release.
Which is 2.4.0 RC.
> About your
> > Splus's parser emits a warning when it sees a backslash
> > outside of the recognized backslash sequence. E.g.,
> >
> > > nchar("\Backslashed?")
> > [1] 12
> > Warning messages:
> >The initial backslash is ignored in \B -- not a recognized escape
> > sequence.
> > Use \\ to ma
John Chambers <[EMAIL PROTECTED]> writes:
> There is a point that needs to be remembered in discussions of
> accessor functions (and more generally).
>
> We're working with a class/method mechanism in a _functional_
> language. Simple analogies made from class-based languages such as
> Java are n
Seth Falcon wrote:
> John Chambers <[EMAIL PROTECTED]> writes:
>
>
>> There is a point that needs to be remembered in discussions of
>> accessor functions (and more generally).
>>
>> We're working with a class/method mechanism in a _functional_
>> language. Simple analogies made from class-base
I created a type of object similar to a data frame. In some circumstances, It
needs special methods for "[" and "[<-" and rbind() (but not cbind()). Then I
found this in the cbind()/rbind() man page:
The method dispatching is _not_ done via 'UseMethod()', but by
C-internal dispatching.
Hum. Then, I need to be more accurate. My object is of class
c("bar", "data.frame"). So, by virtue of ...
The dispatch algorithm is described in the source file
('.../src/main/bind.c') as
1. For each argument we get the list of possible class
memberships from the cl
Actually you can add your own method. See
library(zoo)
rbind.zoo
for an example.
On 9/27/06, Vincent Goulet <[EMAIL PROTECTED]> wrote:
> I created a type of object similar to a data frame. In some circumstances, It
> needs special methods for "[" and "[<-" and rbind() (but not cbind()). Then I
Maybe you could use rbind2, which has an S4 generic in the methods
package, instead?
# BOD is a data frame built into R
foo <- structure(BOD, class = c("bar", "data.frame"))
setOldClass("bar")
setMethod("rbind2", signature(x = "bar", y = "bar"),
function(x, y) {
cat("Hell
On 9/27/06, John Chambers <[EMAIL PROTECTED]> wrote:
> There is a point that needs to be remembered in discussions of accessor
> functions (and more generally).
>
> We're working with a class/method mechanism in a _functional_ language.
> Simple analogies made from class-based languages such as Jav
I'm trying to understand what the underlying issues are here--with the
immediate goal of how that affects my design and documentation
decisions.
On Wed, Sep 27, 2006 at 02:08:34PM -0400, John Chambers wrote:
> Seth Falcon wrote:
> > John Chambers <[EMAIL PROTECTED]> writes:
> >
> >
> >> There i
the following returns an error in an 'exists' call on my machine
MyEnv <- new.env()
setClass("Numeric", "numeric", where=MyEnv)
franklin parlamis
> version
_
platform powerpc-apple-darwin8.7.0
arch powerpc
os darwin8.7.0
system powerpc, darwin
Full_Name: Daniel E. Platt
Version: 2.3.1
OS: Win/XP - Cygwin
Submission from: (NULL) (68.198.10.240)
Error report:
terminate called after throwing an instance of 'St9bad_alloc'
what(): St9bad_alloc
Aborted (core dumped)
No indication of what the calling routine was, where the request came
A previous report (no resolution) here:
https://stat.ethz.ch/pipermail/r-devel/2006-August/038896.html
I guess that's two of us with at least a passing encounter with this!
Martin
Parlamis Franklin <[EMAIL PROTECTED]> writes:
> the following returns an error in an 'exists' call on my machine
>
Hi r-devel,
I am working on a R extension. I am writing the
function in C++, and in my function it is required a R
function object from the user. This R function object
will be evaluated thousand of times in my C++ code. I
generated the shared library and I loaded it on R. I
did several experimen
Patricia Bautista <[EMAIL PROTECTED]> writes:
> Hi r-devel,
>
> I am working on a R extension. I am writing the
> function in C++, and in my function it is required a R
> function object from the user. This R function object
> will be evaluated thousand of times in my C++ code. I
> generated the
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
--27464147-762791266-1159424200=:16565
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT
This does look
This is not how Windows reports errors, and there are no reproduction
instructions. Please do study the section on BUGS in the FAQ.
If this was a report on a Windows build of R, see the rw-FAQ on how to get
useful debugging information.
This look suspiciously like a report from C++ code. Ther
25 matches
Mail list logo