Learn R Programming

haplotypes (version 1.1.3.1)

as.networx-methods: Coerces an object to a networx object

Description

This function coerces Parsimnet object to networx {phangorn} object .

Usage

# S4 method for Parsimnet
as.networx(x,net=1,...)

Value

an object of class networx.

Arguments

x

an object of class Parsimnet.

net

a numeric vector of length one indicating which network to convert.

...

additional arguments to as.splits.

Methods

signature(x = "Parsimnet")

coerces a Parsimnet object to a networx object.

Examples

Run this code

## Coercing a Parsimnet object to a networx object.
data("dna.obj")
x<-dna.obj
p<-parsimnet(x)
nx<-as.networx(p)
plot(nx, "2D")

Run the code above in your browser using DataLab