Hello Dirk,
Your modifications/corrections are VERY helpful, thank you! (also, thank
you for the general kind words and ongoing support, they are much
appreciated)
One more question/improvement - is it possible to have it return
whatever value is inside the "label" attr?
For example, running the following would result in an error:
/*** R
x <- list(a = 1, b=2, 6)
attr(x[[2]], "leaf") = TRUE
attr(x[[2]], "label") = 2
extract_fun(x)
## output:
## Error: expecting a string
/*
Is there a way to either coerce/force "2" to become a string / or to
return it as what it is? (a numeric/double value)?
I thought that was what
label = as<std::string>(x.attr( "label" )) ;
was doing - but apparently it does not coerce non-string into strings