| SAMPLE | R Documentation |
Only the input dataframe is required to run SAMPLE, all the other arguments have default values that can be adjusted (but it is not necessary to do so). To obtain the same output as in the example file, remember to set.seed(812) after importing the dataset. Alternatively, SAMPLE can be run using separate functions. To do so, please refer to RunPerm() for the first step of this process.
SAMPLE(input, output_N = file.path(tempdir(), "Results"), replicates = 50,
stability_thresh = 2, success_points = 10, diff = 1)
input |
Input dataframe (a dataframe object). |
output_N |
Prefix, optionally including a path, used for the output (a character; default is "Results" in the R session's temporary directory). A prefix without a path also writes to the temporary directory. |
replicates |
Number of permutation replicates to perform (an integer; default replicates=50). |
success_points |
Number of successive (mean) prevalence rates that are below a threshold (see parameter stability_thresh) used to define stability (an integer; default success_points = 10). |
stability_thresh |
Threshold used to define stability (an integer). This value will be divided by the square root of the number of replicates (a float; default stability_thresh = 2.0). |
diff |
Difference between absolute minimum and maximum values among the all the means used to set the stability threshold (a float; default diff = 1.0). |
A text file (.txt) with the output values of the analysis, and a PDF file with the generated plots from the analysis.
data("coral_symbionts")
set.seed(812)
output_prefix <- file.path(tempdir(), "Example")
SAMPLE(input = coral_symbionts,
output_N = output_prefix,
replicates = 50,
stability_thresh = 2,
success_points = 10,
diff = 1)
unlink(paste0(output_prefix, ".pdf"))
unlink(paste0(output_prefix, ".txt"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.