randDNA: A function to generate random DNA sequences.

Description Usage Arguments Details Value Author(s) Examples

View source: R/randDNA.R

Description

This function generates random DNA sequences, nucleotides are sampled with frequency 0.25 each.

Usage

1

Arguments

n

The length of the sequence desired.

Details

This function generates random sequences of A, C, T and G. Real DNA is quite different, so one should not use these sequences for much other than pedagogical purposes.

Value

A length one character vector, with n characters randomly chosen from A, C, T and G.

Author(s)

R. Gentleman

Examples

1
randDNA(100)

Example output

Loading required package: graph
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

[1] "CTGGATGATATGGTTGTATAATAAGCCGGTCTGACAAGCTCCCCCTCTGCTGCGGTTTCCCGGAGATTGTTTACGTCCGCGTTACCAAGCTGACAACATT"

RBioinf documentation built on Nov. 8, 2020, 11:11 p.m.