Displaying 2 results from an estimated 2 matches for "lwdf".
Did you mean:
lwd
2005 May 08
3
Light-weight data.frame class: was: how to add method to .Primitive function
...=seq(n))
> system.time(x[i,], gcFirst=TRUE)
[1] 1.01 0.14 1.14 0.00 0.00
>
> x = list(a=seq(n), b=seq(n))
> system.time(lapply(x, function(col) col[i]), gcFirst=TRUE)
[1] 0.06 0.00 0.06 0.00 0.00
>
>
> # the solution: define methods for the light-weight data.frame class
> lwdf = function(...) structure(list(...), class = "lwdf")
>
> # dim
> dim.lwdf = function(x) c(length(x[[1]]), length(x))
>
> # for pretty printing we define print.lwdf via a conversion to
data.frame
> # as.data.frame.lwdf
> as.data.frame.lwdf = function(x) structure(unc...
2005 Dec 09
3
[R] data.frame() size
Hi,
Please see below for post on r-help regarding data.frame() and the
possibility of dropping rownames, for space and time reasons.
I've made some changes, attached, and it seems to be working well. I see the
expected space (90% saved) and time (10 times faster) savings. There are no
doubt some bugs, and needs more work and testing, but I thought I would post
first at this stage.
Could some