MLG-accessors: Accessors for the MLG object

Description Usage Arguments Details Value See Also Examples

Description

This documentation is for developers of poppr. The accessors here are preferred over accessing the elements via the @ symbol. Please use these in your code when accessing MLG objects.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
visible(x)

visible(x) <- value

MLG2df(x)

distname(x)

distname(x) <- value

distargs(x)

distargs(x) <- value

distalgo(x)

distalgo(x) <- value

cutoff(x)

cutoff(x) <- value

Arguments

x

an MLG object

value

see details

Details

These accessors are intended for internal use only. They only affect MLG objects, not genind objects. Only visible and MLG2df are general for all forms of MLG. The distargs and cutoff are specific for use in mlg.filter or any function that offers filtering as an option. The argument "value" will always take the type defined in the MLG class.

Value

see details

See Also

MLG genclone genlight initialize,MLG-method levels,MLG-method unique,MLG-method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
## Not run: 
# These examples will simply show you what you can do with these
set.seed(5000)
(x <- sample(10, 20, replace = TRUE))
(m <- new("MLG", x))

# Visibility ------------------------------
visible(m) # original
visible(m) <- "contracted"
m          # shows contracted MLGS

# Conversion to data frame ----------------
MLG2df(m)  # Grab the internal data frame

# Distance function handling --------------
distname(m) # nei.dist
distargs(m) # list()
distalgo(m) # farthest
cutoff(m)

distname(m) <- substitute("diss.dist")
distargs(m) <- list(percent = TRUE)
distalgo(m) <- "average"
cutoff(m)["contracted"] <- 0.2


## End(Not run)

poppr documentation built on Aug. 22, 2018, 5:03 p.m.