MRwrite {midrangeMCP} | R Documentation |
Export the results of the MRtest
function.
Description
The x
object from a MRtest
is written to file arguments.
Usage
MRwrite(x, MCP = "all", extension = "csv", dataMR = "all")
Arguments
x |
object from the |
MCP |
Allows choosing the multiple comparison test.
The defaut is "all". This option will go perform all tests
from the |
extension |
Type of format of the file. Four options
|
dataMR |
Allows to choose the results to bee written. Three options are
available: |
Details
Note that the choice of the tests in the MRwrite
function must be in accordance with the tests chosen
in the x
argument.
Value
MRwrite
writes the most important results for the chosen
tests in the MCP
argument.
Examples
# Simulated data (completely randomized design)
rv <- c(100.08, 105.66, 97.64, 100.11, 102.60, 121.29, 100.80,
99.11, 104.43, 122.18, 119.49, 124.37, 123.19, 134.16,
125.67, 128.88, 148.07, 134.27, 151.53, 127.31)
# Treatments
treat <- factor(rep(LETTERS[1:5], each = 4))
# Anova
res <- aov(rv~treat)
# Loading the midrangeMCP package
library(midrangeMCP)
# Choosing any tests
results <- MRtest(y = res, trt = "treat", alpha = 0.05,
main = "Multiple Comparison Procedures",
MCP = c("MGM", "TM"))
#Export file in latex (Output in Console)
MRwrite(results, MCP = "all", extension = "latex", dataMR = "all")
#Observation: The MRwrite function export
# only one extension at a time