Learn R Programming

sequences (version 0.5.9)

gccount: Count bases in sequence

Description

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

Usage

gccount(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 <- gccount(s)
cnt
stopifnot(cnt==table(strsplit(s,"")))

Run the code above in your browser using DataLab