compute basic summary statistics (mean, sd, min, median, max) for each variable in one or more xvg_data objects.
Arguments
- xvg_data
a list of class 'xvg_data' or a list containing multiple 'xvg_data' objects, as returned by
read_xvg()
.- merge_results
logical, whether to combine results from multiple objects (default: FALSE). When TRUE, results will include a 'group' column identifying the source.
Value
a data.frame with columns:
- group
(Optional) Source identifier when processing multiple objects with merge_results=TRUE.
- variable
Name of the variable (column) in the xvg data.
- mean
Arithmetic mean of that variable.
- sd
Standard deviation.
- min
Minimum value.
- median
Median value.
- max
Maximum value.
Examples
path <- system.file("extdata/rmsd.xvg", package = "xvm")
xvg <- read_xvg(path)
summary_xvg(xvg)
#> $rmsd.xvg
#> group variable mean sd min median max
#> 1 rmsd.xvg RMSD (nm) 0.1813198 0.01388293 0.0004988 0.1809845 0.241942
#>