plot_optM: plot_optM function

Description Usage Arguments Value Examples

View source: R/plot_optM.R

Description

Plotting the optM results. This function visualizes the output of optM, including the amount of total variation explained across each value of the migration rate

Usage

1
plot_optM(input, method = "Evanno", plot = TRUE, pdf = NULL)

Arguments

input

an object produced by the fucntion 'optM'

method

a string containing the method to use, either "Evanno", "linear", or "SiZer". Default is "Evanno", but needs to match that used in 'optM'

plot

logical of whether or not to display the plot

pdf

string of the file name to save the resulting pdf plot. If NULL, no file is saved. Default is NULL

Value

a plot or pdf of a plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Load a folder of simulated test data for m = 3
folder <- system.file("extdata", package = "OptM")
# Run the Evanno method and plot the results
test.optM = optM(folder)
plot_optM(test.optM, method = "Evanno")

# To view the various linear modeling estimates and plot:
   # test.linear = optM(folder, method = "linear")
   # plot_optM(test.linear, method = "linear")

# To view the results from the SiZer package:
   # test.sizer = optM(folder, method = "SiZer")
   # plot_optM(test.sizer, method = "SiZer")

OptM documentation built on May 1, 2019, 10:11 p.m.