Hello all.

I am interested in creating a mutable "list" object in R.

Ideally I would do it through something like this:

x <- list(a = list(1:4), b = "miao", c = 4:1)
x_RC <- as.RefClass(x)
attr(x_RC[[2]], "I am") <- "string"
x_RC[[3]] <- x_RC[[3]]+1
x_new <- as.list(x_RC)

Is that reasonably possible to create? Or does that make little/no-sense?

Thanks.




----------------Contact
Details:-------------------------------------------------------
Contact me: tal.gal...@gmail.com |
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to