12#ifndef ROOT_R_TRDataFrame
13#define ROOT_R_TRDataFrame
204 Rcpp::CharacterVector names =
fDf.attr(
"names");
207 if (names[
i] ==
fName.Data()) {
218 Rcpp::List nDf(
size + 1);
219 Rcpp::CharacterVector nnames(
size + 1);
222 nnames[
i] = names[
i];
226 nDf.attr(
"class") =
fDf.attr(
"class") ;
227 nDf.attr(
"row.names") =
fDf.attr(
"row.names") ;
228 nDf.attr(
"names") = nnames ;
241 Rcpp::CharacterVector names =
fDf.attr(
"names");
244 if (names[
i] ==
fName.Data()) {
252 Rcpp::List nDf(
size + 1);
253 Rcpp::CharacterVector nnames(
size + 1);
255 nDf[
i] = obj.
fDf[
i] ;
256 nnames[
i] = names[
i];
261 nDf.attr(
"class") = obj.
fDf.attr(
"class") ;
262 nDf.attr(
"row.names") = obj.
fDf.attr(
"row.names") ;
263 nDf.attr(
"names") = nnames ;
294 Rcpp::CharacterVector names =
fDf.attr(
"names");
297 if (names[
i] ==
fName.Data()) {
305 Rcpp::List nDf(
size + 1);
306 Rcpp::CharacterVector nnames(
size + 1);
309 nnames[
i] = names[
i];
314 nDf.attr(
"class") =
fDf.attr(
"class") ;
315 nDf.attr(
"row.names") =
fDf.attr(
"row.names") ;
316 nDf.attr(
"names") = nnames ;
321 template <
class T>
operator T()
325 template <
class T>
operator T()
const
385 operator SEXP()
const
406 Rcpp::CharacterVector names =
df.attr(
"names");
430 if (label && !label[0]) {
std::vector< TString > TVectorString
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
#define ClassDef(name, id)
Binding operator=(T var)
template method for operator assignation
Binding & operator>>(T &var)
Template method for operator >> that lets to use dataframes like streams example: df["v"]>>vector;.
Binding operator=(Binding obj)
method for operator assignation of Binding class
Binding(Rcpp::DataFrame &_df, TString name)
Construct a Binding nestead class for facilities with operators.
Binding & operator<<(T var)
Template method for operator << that lets to use dataframes like streams example: df["v"]<<vector;.
Binding(const Binding &obj)
Copy constructor for Binding nestead class.
This is a class to create DataFrames from ROOT to R.
Binding operator[](const TString &name)
Int_t GetNcols()
Method to get the number of columns.
TMatrixT< T > AsMatrix()
Method to get dataframe as matrix.
void Print(const Char_t *label="")
Method to print the dataframe in stdout or a column given the label.
TRDataFrame(SEXP obj)
TDataFrame constructor.
TRDataFrame()
Default TDataFrame constructor.
TRDataFrame & operator=(TRDataFrame obj)
Int_t GetNrows()
Method to get the number of rows.
TVectorString GetColNames()
Method to get labels of dataframe.
TRDataFrame & operator=(SEXP obj)
TRDataFrame(const Rcpp::DataFrame &_df)
TDataFrame constructor for Rcpp::DataFrame.
TRDataFrame & operator=(TRDataFrame &obj)
This is a class to pass functions from ROOT to R.
TObject()
TObject constructor.
const char * Data() const
namespace associated R package for ROOT.
const Rcpp::internal::NamedPlaceHolder & Label
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
SEXP wrap(const TString &s)