View source: R/functions_make.R
make_dt | R Documentation |
Creates a data.table from a vector of files.
make_dt(files, group_lev = NULL, max_name_len = 30)
files |
character vector of file paths. |
group_lev |
If provided, should be directory names at equivalent depth in file paths. Default of NULL disables this functionality and group will be none and batch will be A. |
max_name_len |
Names are truncated to this length. Default is 30. |
A data.table with attribute "file" and "name", "group", and "batch" attributes.
files = c("exp1/file1", "exp1/file2", "exp2/file3")
#default no group levels
make_dt(files)
dt1 = make_dt(files, group_lev = c("exp1", "exp2"))
levels(dt1$group)
dt1$batch
#reversed group_lev
dt2 = make_dt(files, group_lev = rev(c("exp1", "exp2")))
levels(dt2$group)
dt2$batch
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.