rm.plot2: rm.plot for data with too many cells

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/rm.plot2.R

Description

This function is a convenient wrapper for rm.plot that aggregates the data per individual dataset and passes the resulting data to rm.plot.

Usage

1
rm.plot2(d, col.id, col.offset, col.x, col.d, fun.aggregate = "mean", ...)

Arguments

d

A data.frame

col.id

character vector specifying the id column.

col.offset

character vector specifying the offset column.

col.x

character vector specifying the x-axis column.

col.d

character vector specifying the data column.

fun.aggregate

Function or function name used for aggregating the results. Default is "mean".

...

further arguments passed to rm.plot.

Details

Uses aggregate with formula notation for aggregation.

Value

nothing (a plot is created using base graphics)

Author(s)

Henrik Singmann

See Also

add.ps can be used to compare the values at each x-axis position.

rm.plot has all the arguments.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
#The examples uses the OBrienKaiser dataset from car and needs reshape.
require(reshape)
require(car)
data(OBrienKaiser)
OBKnew <- cbind(factor(1:nrow(OBrienKaiser)), OBrienKaiser)
colnames(OBKnew)[1] <- "id"
OBK.long <- melt(OBKnew)
OBK.long[, c("measurement", "time")] <- t(vapply(strsplit(as.character(OBK.long$variable), "\\."),  "[", c("", "")))

rm.plot2(OBK.long, "id", "measurement", "gender", "value")

rm.plot2(OBK.long, "id", "treatment", "gender", "value")


## End(Not run)

rm.plot documentation built on May 2, 2019, 5 p.m.