Learn R Programming

haplotypes (version 1.0)

names-methods: Function to get or set names of a Dna object

Description

Function to get or set names of an object.

Usage

# S4 method for Dna
names(x)
# S4 method for Dna
names(x)<-value

Arguments

x

an object of class Dna.

value

a character vector of the same length as nrow(x).

Methods

signature(x = "Dna")

Function to get or set names of an object of Dna.

Examples

Run this code
# NOT RUN {
data("dna.obj")

x<-dna.obj
x<-as.dna(x[1:4,1:6])

## Getting sequence names.
names(x)

## Setting sequence names.
names(x)<-c("u","v","z","y")
names(x)

# }

Run the code above in your browser using DataLab