tolower-methods: Convert sequence characters from upper to lower case or vice...

Description Usage Arguments Value Methods Examples

Description

Convert sequence characters in a Dna object from upper to lower case or vice versa.

Usage

1
2
3
4
## S4 method for signature 'Dna'
tolower(x)
## S4 method for signature 'Dna'
toupper(x)

Arguments

x

an object of class Dna.

Value

an object of class Dna.

Methods

signature(x = "Dna")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
	
## Coercing a list to a 'Dna' object.
seq1<-c("?","A","C","g","t","-","0","1")
seq2<-c("?","A","C","g","t","-","0","1","2")
seq3<-c("?","A","C","g","t","-","0","1","2","3")
x<-list(seq1=seq1,seq2=seq2,seq3=seq3) 
dna.obj<-as.dna(x)

#characters in Dna object
table(as.matrix(dna.obj))

##all lower case
lowc<-tolower(dna.obj)
#characters
table(as.matrix(lowc))

##all upper case
upc<-toupper(dna.obj)
#characters
table(as.matrix(upc))

haplotypes documentation built on Feb. 28, 2020, 5:08 p.m.