slim {strvalidator} | R Documentation |
Slim Data Frames
Description
Slim data frames with repeated columns.
Usage
slim(data, fix = NULL, stack = NULL, keep.na = TRUE, debug = FALSE)
Arguments
data |
data.frame. |
fix |
vector of strings with column names to keep fixed. |
stack |
vector of strings with column names to slim. |
keep.na |
logical, keep a row even if no data. |
debug |
logical indicating printing debug information. |
Details
Stack repeated columns into single columns. For example, the following data frame: Sample.Name|Marker|Allele.1|Allele.2|Size.1|Size.2|Data.Point.. using this command: slim(data, fix=c("Sample.Name","Marker"), stack=c("Allele","Size")) would result in this data frame (NB! 'Data.Point' is dropped): Sample.Name|Marker|Allele|Size
Value
data.frame
[Package strvalidator version 2.4.1 Index]