Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/DataFormat_Utils.R
converts a dataframe to a DarwinCore extended Measurement Or Fact (eMOF) file
1 | wideTable.to.eMoF(metadata.object, variables)
|
metadata.object |
a MIxS.metadata object |
variables |
a character vector. a list of the variables that need to be included in the eMoF |
extended Measurement or Fact (eMoF) as a DarwinCore extension to standardize environmental or other additional data in a computer readable fashion. This standard structures data into a long format (a column with sample name, variable name and value). This function converts more commonly used wide format tables (that is, structured like a matrix, e.g. samples as rows and variables as columns) into the correct long format that complies to eMoF
a data.frame formatted as an extended Measurement or Fact table
Maxime Sweetlove
Other formating functions:
combine.data.frame()
,
combine.data()
,
eMoF.to.wideTable()
,
wideTab.to.hierarchicalTab()
1 2 3 4 5 6 7 8 9 10 11 12 13 | sampleNames <- c("sample_1", "sample_2")
test_MIxS <- new("MIxS.metadata",
data = data.frame(var1=c(1,2), var2=c(3,4),
eventID=sampleNames,
row.names=sampleNames),
section = c(var1="section1", var2="section1",
eventID="miscellaneous"),
units = c(var1="unit1", var2="unit2",
eventID="alphanumeric"),
env_package = "water",
type = "versatile",
QC = TRUE)
wideTable.to.eMoF(metadata.object=test_MIxS, variables=c("var1", "var2"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.