c1 is already defined, so you simply want
c1 = as(c1);
That is, when you write
NumericVector c1 = as(c1);
you are effectively trying to create a new NumericVector called `c1` -- but
since an object with the name `c1` already exists in scope, that fails.
Kevin
On Wed, Jun 10, 2015 at 1
I found the explanation alone.
The "list to data.frame" conversion was done by simply: returned_frame.attr(
"class") = "data.frame";
This is my solution for a transposed data.frame
## The "R"code for the list:
mylist=list(c("1" , "", "0" , "112.6336"),c("2" , "*" , "20" , "113.0659"),
c("3" , ""
Dear List,
Could I have some explanation comments on this code:
https://github.com/jjallaire/rcpp-gallery/blob/gh-pages/src/2013-01-22-faster-data-frame-creation.cpp
?
I just want to transpose the resulting data frame. However, I want to do it
myself but I don't understand the code.
Thank you for