export.root: Export data from ROOT file

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Export data as text files directly from a ROOT file.

Usage

1
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)

Arguments

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.

Details

Export data as text files directly from a ROOT file.

Value

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

Author(s)

Christian Stratowa

See Also

export, export-methods

Examples

1
2
3
4
5
## 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)

xps documentation built on Nov. 8, 2020, 6 p.m.