R/gc_content.R
gc_content.Rd
Calculates the percentage of nucleotides in a DNA sequence that are either guanine (G) or cytosine (C).
gc_content(sequence)
A character string containing the DNA sequence.
A numeric value representing the percentage of nucleotides in the sequence that are G or C.
sequence <- "ATCGAGCTAGCTAGCTAGCTAGCT" gc_content(sequence) #> [1] 50 50 #> [1] 50