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")

Example output

Finished reading .llik, .modelcov.goz, and .cov.gz files.

No output file will be saved. To save an output file, run with 'tsv = "file.tsv"'

m ranges between 0 and 10.

The average number of iterations per m (not including m = 0) was 10.

Make sure these values are correct...

Analyzing the treemix results using the Evanno method.

Finished calculating delta m.

The maximum value for delta m was 73.4671 at m = 3 edges.

Finished all calculations for the Evanno method.



No output file will be saved. To save an output file, run with 'pdf = "file.pdf"'

Plotting the treemix results using the Evanno method.

No plot file has been saved.

Finished plotting.  All results are saved to the current directory as requested.

OptM documentation built on Oct. 1, 2021, 1:06 a.m.