auto fVar = tdf.Take<std::string>("col");
auto indexSort = Argsort(fVar);
causes following error message. How can I convert RResultPtr to an RVec ?
error: no matching function for call to 'Argsort'
auto indexSort = Argsort(fVar);
^~~~~~~
/Users/eddyo/src/root_cmake/root_cmake/include/ROOT/RVec.hxx:721:35: note: candidate template ignored: could not match 'RVec' against 'RResultPtr'
RVec<typename RVec<T>::size_type> Argsort(const RVec<T> &v)
ROOT Version: Not Provided Platform: Not Provided Compiler: Not Provided
Hi Danilo,
Thank you for the quick response. But now I am confused because I thought that
the default output of a Take action was an RVec, see description on the
cheat sheet RDataFrame:
“Extract a column from the dataset as a collection of values. If the type of the column is a C-style array, the type stored in the return container is a ROOT::VecOps::RVec<T> to guarantee the lifetime of the data involved.”
this is indeed true. The issue here is that the type of a branch is string and not double[5] (which is not a type, but ok )
I admit that the sentence in the doc is to be improved and it will.
Hi Danilo,
Just to help you in the formulation (and stupid I was ). For the formulation it was not clear to me that each row entry had to be a C-style array. I thought that as long it was a simple type, the whole column constituted a C-style array.
-Eddy