as.tfa_metadata checks the contents of a metadata file for the presence of group and instance IDs, and it convert the data frame as an object of class tfa_metadata.

as.tfa_metadata(dataframe)

Arguments

dataframe

a dataframe containing metadata for a factor analysis of ancient DNA. The meta data could contain information on individual ID's, group ID's, country of origin, sample age, etc. Columns with names 'Instance.ID' and 'Group.ID' are mandatory.

Value

an object of class tfa_metadata

References

François, O., Jay, F. (2020). Factor analysis of ancient DNA samples.

See also

Examples

library(tfa) # Ancient DNA from Bronze Age Great Britain samples # including Steppe (Yamnaya), hunter gatherers, and early farmers from Anatolia data(england_ba) attach(England_BA) metadata <- as.tfa_metadata(meta) detach(England_BA)