export.root               package:xps               R Documentation

_E_x_p_o_r_t _d_a_t_a _f_r_o_m _R_O_O_T _f_i_l_e

_D_e_s_c_r_i_p_t_i_o_n:

     Export data as text files directly from a 'ROOT' file.

_U_s_a_g_e:

     export.root(datafile = character(0), schemefile = character(0), treeset = character(0), treename = "*", treetype = character(0), varlist = "*", outfile = character(0), sep = "\t", as.dataframe = FALSE, verbose = TRUE)

_A_r_g_u_m_e_n_t_s:

datafile: name of ROOT data file including full path

schemefile: name of ROOT scheme file including full path

 treeset: name of subdirectory in ROOT file where trees are stored

treename: name of ROOT tree to export.

treetype: type of tree(s) to export, see 'validTreetype'.

 varlist: names of tree leaves to export.

 outfile: name of output file.

     sep: column separator

as.dataframe: if 'TRUE' a data.frame will be returned.

 verbose: logical, if 'TRUE' print status information.

_D_e_t_a_i_l_s:

     Export data as text files directly from a 'ROOT' file.

_V_a_l_u_e:

     If 'as.dataframe' is 'TRUE', the data will be imported into the
     current R session as 'data.frame'. Otherwise, 'NULL' will be
     returned.

_A_u_t_h_o_r(_s):

     Christian Stratowa

_S_e_e _A_l_s_o:

     'export', 'export-methods'

_E_x_a_m_p_l_e_s:

     ## export data directly from root file
     schemefile <- paste(.path.package("xps"),"schemes/SchemeTest3.root",sep="/")
     datafile   <- paste(.path.package("xps"),"rootdata/DataTest3_cel.root",sep="/")
     data <- export.root(datafile, schemefile, "DataSet", "*", "cel", "*", "DataOutFile.txt", as.dataframe = TRUE,verbose=FALSE)
     head(data)

