Skip to content
Prev 6341 / 10988 Next

[Rcpp-devel] Returning an element from a List with its attributes?

Dear Wush and others,
Just to followup and say I've used this idea here:
https://github.com/talgalili/dendextendRcpp/blob/master/src/cut_lower.cpp

In general, it would have been better for me, where it possible to do some
(or all) of the things below:
1) Get the length of a List
2) Change the attribute of elements within a list
3) Have this not happen:

require(Rcpp)
cppFunction('
            SEXP temp(List x){
            return(x);
            }
            ')
x = list(structure(1L, animal = "cat"))
temp(x)
temp(x[[1]]) # I wish this didn't happen

(I'm possibly missing out things, but I thought of listing it just in case)


Many thanks for the help!
Tal






----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili at gmail.com |
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------
On Tue, Aug 20, 2013 at 12:25 PM, Tal Galili <tal.galili at gmail.com> wrote:

            
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20130821/b150d1e0/attachment.html>