Re: [Rcpp-devel] Simple List Operations

2013-03-06 Thread Dirk Eddelbuettel
On 6 March 2013 at 12:07, Greg Minshall wrote: | (since i've just been here...) | | .../unitTests/runit.Vector.R has these tests: | | test.List.erase <- function(){ | fun <- list_erase | d <- list( x = 1:10, y = letters[1:10] ) | checkEquals(fun(d), | list( y = le

Re: [Rcpp-devel] Simple List Operations

2013-03-06 Thread Greg Minshall
(since i've just been here...) .../unitTests/runit.Vector.R has these tests: test.List.erase <- function(){ fun <- list_erase d <- list( x = 1:10, y = letters[1:10] ) checkEquals(fun(d), list( y = letters[1:10] ), msg = "List.erase" ) } test.List.e

[Rcpp-devel] Simple List Operations

2013-03-06 Thread Rodney Sparapani
Hi Gang: I have been looking for this all day today and I can't seem to find what I am looking for. I need to do some list operations like extend the list or remove an item from the list. In R, to remove an item, say 7, you just do '> a[[7]] <- NULL'. How can I do that with Rcpp? Pointers to

[Rcpp-devel] how to return an R list of reference objects

2013-03-06 Thread Greg Minshall
hi. i am again reporting some finding. (please let me know if this is not an appropriate use of the list) my question was, if i want to return from C++ an R list of reference objects (i.e., i'm using Rcpp::Module), how would i do that? the little test below appears to do this. cheers. t