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

names-methodsR Documentation

Function to get or set names of a Dna object or Parsimnet object

Description

Function to get or set sequence names of Dna object or names of network in Parsimnet object.

Usage

## S4 method for signature 'Dna'
names(x)
## S4 method for signature 'Parsimnet'
names(x)
## S4 replacement method for signature 'Dna'
names(x)<-value
## S4 replacement method for signature 'Parsimnet'
names(x)<-value

Arguments

x

an object of class Dna or Parsimnet.

value

a character vector of the same length as number of sequence or networks.

Methods

signature(x = "Dna")

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

signature(x = "Parsimnet")

Function to get or set names of networks in Parsimnet object.

Examples


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)



x<-dna.obj
p<-parsimnet(x,prob=.99)

##Getting network names in parsimnet object
names(p)
## Setting network names names.
names(p)<-c("a","b","c","d","f","g")
names(p)


haplotypes documentation built on July 26, 2023, 5:22 p.m.