Learn R Programming

gphmm (version 0.99.0)

generateRandomSequences: Split randomly any R object for which method length() has been defined into a train set and a test set.

Description

generateRandomSequences returns a list with indices for train and test sets.

Usage

generateRandomSequences(n = 2, meanLen = 10, sdLen = 0, seed = NULL,
  ncores = NULL, prob = rep(0.25, 4))

Arguments

n

- int, number of sequences to generate.

meanLen

- float, mean of the length distribution (gaussian) of the generated sequences.

sdLen

- float, sd of the length distribution (gaussian) of the generated sequences.

seed

- int, when the same seed and parameters are used, exact same sequences are generated.

ncores

- int, number of cores to use.

prob

- vector of length 4 with the probability for the 4 nucleotides (A, C, G, T).

Examples

Run this code
# NOT RUN {
generateRandomSequences(n = 2, meanLen = 20, sdLen = 2)
generateRandomSequences(n = 4, meanLen = 5, sdLen = 0)
# }

Run the code above in your browser using DataLab