selex.split: Randomly split a dataset

Description Usage Arguments Details Value See Also Examples

View source: R/SELEX.R

Description

A function used to randomly split and store a dataset into smaller fractions as defined by ratios. This is useful in generating cross-validation datasets for Markov Model testing when none are available.

Usage

1

Arguments

sample

A sample handle to the dataset to be split.

ratios

The fractions with with new datasets should be generated. If NA, ratios is set to c(.5,.5) and sample is evenly split into two datasets.

Details

selex.split saves the newly generated datasets in the current working directory and makes them visible to the current SELEX session. Naming convention of new samples: New sequence name = <seqName>.split.x ; New sample name = <sampleName>.split.x .

Value

Not applicable

See Also

selex.defineSample, selex.loadAnnotation, selex.mm, selex.sampleSummary

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Split the r0 sample into testing and training datasets
r0.split = selex.split(sample=r0)

# show information about subsamples
names(r0.split)
r0.split$info
selex.getAttributes(r0.split$train)

# Display all currently loaded samples
selex.sampleSummary() 

SELEX documentation built on Nov. 8, 2020, 5:22 p.m.