import2 | R Documentation |
import2 Function to import a metadata table file and its corresponding dataMatrix file. import2 performs checks to ensure the identifiers match between the two tables and stops with an explicit error message in case identifiers do not match.
import2(pathDM, pathMeta, typeMeta, disable_comm = TRUE)
pathDM |
a path to a file corresponding to the dataMatrix |
pathMeta |
a path to a file corresponding to the metadata table |
typeMeta |
"sample" or "variable" depending on the metadata content |
disable_comm |
a |
a list
containing two elements:
dataMatrix a data.frame
corresponding to the imported dataMatrix table;
metadata a data.frame
corresponding to the imported metadata table
M.Petera
dm_path <- system.file(
"extdata",
"mini_datamatrix.txt",
package="W4MRUtils"
)
meta_path <- system.file(
"extdata",
"mini_variablemetadata.txt",
package="W4MRUtils"
)
## import considering # is not a comment character
A <- W4MRUtils::import2(dm_path, meta_path, "variable")
print(A$dataMatrix[1:5, 1:5])
print(A$metadata[1:5, ])
## import considering # is a comment character
B <- W4MRUtils::import2(dm_path, meta_path, "variable", disable_comm = FALSE)
print(B$dataMatrix[1:5, 1:5])
print(B$metadata[1:5, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.