dreport.single:

Usage Arguments Examples

View source: R/dreport.single.R

Usage

1

Arguments

x
y

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (x, y) 
{
    model <- aov(y ~ x)
    com <- duncan.test(model, "x", alpha = 0.05)
    a <- arrange(com$groups, by = row.names(com$groups))
    b <- paste0(round(a[[1]], digits = 2), a[[2]])
    c <- round(sqrt(com$statistics[[1]]), digits = 2)
    d <- format(summary(model)[[1]][5]$`Pr(>F)`[1], format = "e", 
        digits = 2)
    out <- as.data.frame(matrix(c(b, c, d), 1, 5))
    colnames(out) <- c(levels(x), "SEM", "P value")
    rownames(out) <- paste(deparse(substitute(y)))
    env <- c(var_x = paste(deparse(substitute(x))), var_y = paste(deparse(substitute(y))))
    output <- list(env = env, summary = summary(model), multcom = com, 
        abstract = out)
    output
  }

SangbuemCho/dreport documentation built on Jan. 2, 2020, 12:49 a.m.