import3 | R Documentation |
import3 Function to import the three W4M tables from files (dataMatrix, sampleMetadata, variableMetadata) import3 performs checks to ensure the identifiers match between the three tables and stops with an explicit error message in case identifiers do not match.
import3(pathDM, pathSM, pathVM, disable_comm = TRUE)
pathDM |
a path to a file corresponding to the dataMatrix |
pathSM |
a path to a file corresponding to the sampleMetadata |
pathVM |
a path to a file corresponding to the variableMetadata |
disable_comm |
a |
a list
containing three elements:
dataMatrix a data.frame
corresponding to the imported dataMatrix table;
sampleMetadata a data.frame
corresponding to the imported sampleMetadata table;
variableMetadata a data.frame
corresponding to the imported variableMetadata table
M.Petera
dm_path <- system.file(
"extdata",
"mini_datamatrix.txt",
package="W4MRUtils"
)
vm_path <- system.file(
"extdata",
"mini_variablemetadata.txt",
package="W4MRUtils"
)
sm_path <- system.file(
"extdata",
"mini_samplemetadata.txt",
package="W4MRUtils"
)
## import considering # is not a comment character
A <- W4MRUtils::import3(dm_path, sm_path, vm_path)
print(A$dataMatrix[1:5, 1:5])
print(A$sampleMetadata[1:5, ])
print(A$variableMetadata[1:5, ])
## import considering # is a comment character
B <- W4MRUtils::import3(dm_path, sm_path, vm_path, disable_comm = FALSE)
print(B$dataMatrix[1:5, 1:5])
print(B$sampleMetadata[1:5, ])
print(B$variableMetadata[1:5, ])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.