EcologicalTraitData / traitdataform

A package to manage and compile functional trait data into predefined templates
https://ecologicaltraitdata.github.io/traitdataform/
Other
33 stars 9 forks source link

function to cast traitdata back into matrix format #19

Open fdschneider opened 7 years ago

fdschneider commented 7 years ago

This is applying reshape::cast(). Only for 'aggregated' data without multiple measurements of one trait.

Otherwise, definitions must be set for how to aggregate data, if one taxon has multiple measurements for one trait. It is impossible to make advanced assumptions about the data quality.

fdschneider commented 5 years ago

this is implemented with cast.traitdata(). For now this reshapes the dataset into a matrix, mainting all other structural information, be it observation level data, or species level data.

In the future, the function might be extended to compile aggregate measures from multiple values, e.g. by pulling them into means or ranges, and by handling categorical values into unified responses.

fdschneider commented 5 years ago

the function argument fun.aggregate is forwarded to reshape::dcast() which can be used to define a method for aggregation. More testing required.