Description Usage Arguments Details Value Examples
View source: R/MergeIndividualFiles.R
MergeIndividualFiles
merges data from individual sample data and
returns list of matrices.
1 2 3 4 5 6 7 8 | MergeIndividualFiles(
fileDirectory,
filePattern = NULL,
filePrefix = NULL,
indVars = "auto",
IDcol = 1,
...
)
|
fileDirectory |
a character vector of full path names to directory containing individual files. |
filePattern |
an optional regular expression. Only file names which match the regular expression will be returned. Strings matching regular expression will be removed from column names in returned dataset. |
filePrefix |
an optional regular expression. Strings matching regular expression will be removed from column names in returned dataset. |
indVars |
character vector of column names in individual files that correspond with individual measures (e.g. not annotation). Default value is all columns except those in IDcol. |
IDcol |
character or numeric vector of columns in individual files on which to merge |
... |
additional parameters to be passed to data.table::fread() |
This function reads in files containing data from individual samples and merges individual data into one dataset by variable or measurement.
A list of merged data. The first list element contains annotations (e.g. columns that are not included in indVars). All other list elements are matrices with rownames matching values in IDcol and columns matching file names.
1 2 3 4 5 6 7 8 | ## Not run:
out <- MergeIndividualFiles(
fileDirectory = paste0(path.package("MultiDataAnalysis"), "/extdata/"),
filePattern = ".txt.gz", indVars = c("AllSubs", "Coverage-q25", "MeanQ",
"BaseCount[A,C,G,T]", "Frequency", "Pvalue"),
IDcol = c("Region", "Position", "Reference", "Strand"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.