Learn R Programming

sequences (version 0.5.9)

gccount2: Count bases in sequence (using Rcpp)

Description

Returns the number of 'A', 'C', 'G' and 'T' bases in the 'inseq' sequence string.

Usage

gccount2(inseq)

Arguments

inseq
a DNA sequence string.

Value

  • A numeric of length 4

Details

This function calls a C primitive

Examples

Run this code
s <- "AAAACCCGGT"
cnt <- gccount2(s)
cnt
stopifnot(cnt==table(strsplit(s,"")))

Run the code above in your browser using DataLab