MRwrite: Export the results of the 'MRtest' function.

Description Usage Arguments Details Value Examples

Description

The x object from a MRtest is written to file arguments.

Usage

1
MRwrite(x, MCP = "all", extension = "csv", dataMR = "all")

Arguments

x

object from the MRtest functions.

MCP

Allows choosing the multiple comparison test. The defaut is "all". This option will go perform all tests from the MRtest object.

extension

Type of format of the file. Four options "csv", "txt" "xlsx" and "latex". The default is "csv".

dataMR

Allows to choose the results to bee written. Three options are available: "groups", "summary" or "all". The option "groups" writes the treatment mean groups avaluated by the chosen test in the MCP argument. The "summary" writes the descriptive statistics of the response variable. The options "all" should be chosen for both results.

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

 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
28
29
30
31
32
33
34
# 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("SKM", "TM"))

#Export file in latex (Output in Console)
MRwrite(results, MCP = "all", extension = "latex", dataMR = "all")

#Export file with extension txt (Output in Directory)
MRwrite(results, MCP = "all", extension = "txt", dataMR = "all")

#Export file with extension csv (Output in Directory)
MRwrite(results, MCP = "all", extension = "csv", dataMR = "all")

#Export file to Microsoft excel (Output in Directory)
MRwrite(results, MCP = "all", extension = "xlsx", dataMR = "all")

#Observation: The MRwrite function export
#             only one extension at a time

midrangeMCP documentation built on May 1, 2019, 9:17 p.m.