Mean_pt: Drawing mean points used with overdraw()

Description Usage Arguments See Also Examples

View source: R/plotn.R

Description

Drawing mean points used with overdraw()

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
Mean_pt(
  x = NULL,
  formula = NULL,
  data = NULL,
  at = NULL,
  SD = F,
  SE = F,
  group = NULL,
  mean.column = 1,
  dev.column = 2,
  pch = 21,
  cex = 1.5,
  col.mean = NULL,
  col.bg = NULL,
  lwd.mean = 1,
  col.bar = NULL,
  lwd.bar = 1,
  lty = 1,
  length = 0.5,
  horizontal = F,
  plot = T
)

Arguments

x

Data, e.g. numeric vector, formula, e.g. y ~ x, or other object containing analysis result

formula

formula

data

If formula is inputted in "x" or "formula" parameter, a data.frame (or list) from which the variables in formula should be taken.

at

Drawing position

SD

If set "T", standard deviation is drawn. Default is "F".

SE

If set "T", standard error is drawn. Default is "F".

group

Grouping factor

mean.column

Column which means are stored.

dev.column

Column which sd or se are stored.

pch

pch, default is 21.

cex

cex, default is 1.5.

col.mean

mean points color, default is "#000000".

col.bg

mean points background color, default is "#FFFFFF".

lwd.mean

mean lwd, default is 1.

col.bar

error bar color, default is "#000000".

lwd.bar

error bar lwd, default is 1.

lty

line type of error bar, default is 1.

length

Length of vertical bar of tip in error bar, default is 0.5

horizontal

horizontal, default is "F".

plot

If set "F", calculate is only done.

See Also

[plotn::overdraw]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
d <- data.frame(x = c(1:10, 11:20, 21:30, 31:40),
                group = rep(c("A","B","C", "D"), each = 10))
pos <- barplotn(x ~ group, data = d)
overdraw(Mean_pt(x ~ group, data = d, at = pos, SD = TRUE))

pos <- barplotn(x ~ group, data = d)
overdraw(Mean_pt("x", data = d, group = "group", at = pos,
                 SE = TRUE))

pos <- barplotn(x ~ group, data = d)
overdraw(Mean_pt(d, group = "group", at = pos, SE = TRUE))
#d[,1] is data

pos <- barplotn(x ~ group, data = d)
md <- Mean_pt(x ~ group, data = d, SE = TRUE, plot = FALSE)
overdraw(Mean_pt(md, at = pos, SE = TRUE))

bugplant/plotn documentation built on June 23, 2021, 1:18 a.m.