makeExampleMatchedDataSet {nullranges} | R Documentation |
This function will generate an example dataset as either 1) input
for matchRanges()
(when matched = FALSE
) or 2) a
Matched Object (when matched = TRUE
).
makeExampleMatchedDataSet( type = "DataFrame", matched = FALSE, method = "rejection", replace = FALSE, ... ) ## S4 method for signature ## 'character_OR_missing, ## logical_OR_missing, ## character_OR_missing, ## logical_OR_missing' makeExampleMatchedDataSet(type, matched, method, replace)
type |
Character designating which type of dataset to make. options are one of 'data.frame', 'data.table', 'DataFrame', 'GRanges', or 'GInteractions'. |
matched |
TRUE/FALSE designating whether to generate a
Matched dataset ( |
method |
Character describing which matching method to use. Supported options are either 'nearest', 'rejection', or 'stratified'. |
replace |
TRUE/FALSE describing whether to select matches with or without replacement. |
... |
Additional arguments |
When matched = FALSE
, the data returned contains 3 different
features that can be subset to perform matching.
Returns an example Matched dataset or an example dataset for
input to matchRanges()
.
## Make examples for matchRanges() (i.e matched = FALSE) set.seed(123) makeExampleMatchedDataSet() head(makeExampleMatchedDataSet(type = 'data.frame', matched = FALSE)) makeExampleMatchedDataSet(type = 'data.table', matched = FALSE) makeExampleMatchedDataSet(type = 'DataFrame', matched = FALSE) makeExampleMatchedDataSet(type = 'GRanges', matched = FALSE) makeExampleMatchedDataSet(type = 'GInteractions', matched = FALSE) ## Make Matched class examples (i.e. matched = TRUE) set.seed(123) makeExampleMatchedDataSet(matched = TRUE) makeExampleMatchedDataSet(type = 'DataFrame', matched = TRUE, method = 'rejection', replace = FALSE) makeExampleMatchedDataSet(type = 'GRanges', matched = TRUE, method = 'rejection', replace = FALSE) makeExampleMatchedDataSet(type = 'GInteractions', matched = TRUE, method = 'rejection', replace = FALSE)