as.tfa_metadata: Convert a data frame into an object of class 'tfa_metadata'

Description Usage Arguments Value References See Also Examples

View source: R/ancestry_coefficients.r

Description

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.

Usage

1
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

England_BA, ancestry_coefficients

Examples

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

bcm-uga/tfa documentation built on Aug. 28, 2020, 2:46 p.m.