nickmckay / LiPDverse

Creating interactive dashboards for LiPD files, datasets and libraries
GNU General Public License v3.0
3 stars 1 forks source link

what is the difference between the TS and sTS objects? #135

Closed chrisdane closed 3 years ago

chrisdane commented 3 years ago

Hi

When I download https://lipdverse.org/globalHolocene/current_version/globalHolocene1_0_0.RData and load it into a R work space, the 3 objects D, TS and sTS are loaded. Can you give an explanation on the differences of these 3 objects?

In https://github.com/nickmckay/LiPDverse/blob/master/start.Rmd you use TS.

In https://github.com/nickmckay/LiPD-utilities/tree/master/R you explain that D

"Represents` multiple datasets read into a single variable. Each dataset is organized by its dataset name. D[["ODP1098B13"]][["paleoData"]]".

But TS and sTS are not explained there.

Thanks for any help, Chris

nickmckay commented 3 years ago

Briefly, the D object is a list of LiPD objects, which are essentially just R representations of LiPD files. The TS and sTS objects are Timeseries objects that flatten that hierarchical structure to a long, wide list with one instance for each column in a data table. A longer description is available here, and examples of how to work with TS objects are available in the Tutorials for geoChronR. The only difference between TS and sTS, is that the sTS has it's interpretation columns split by scope (i.e., "climate", "isotope", etc) for convenience.