Learn R Programming

eggCounts (version 2.4)

plotCounts: Plot faecal egg count data

Description

Plot egg count data to reflect changes between before and after treatment.

Usage

plotCounts(data, paired = TRUE, points = TRUE, 
    points.method = "jitter",  xlabel = "", 
    ylabel = "Faecal egg counts [epg]", ...)

Value

A plot is drawn.

Arguments

data

a data.frame with two columns, the first column is before treatment counts, the second column is after treatment counts.

paired

logical. If TRUE, uses the plot for the paired design. Otherwise uses the plot for the unpaired design.

points

logical. If TRUE, add individual points for unpaired plot. Not used if paired = TRUE.

points.method

string. It is used to separate coincident points if points = TRUE. One of “jitter”, “stack” or “overplot”.

xlabel

string. Label of x-axis.

ylabel

String. Label of y-axis.

...

Additional arguments for function xyplot if paired is TRUE, for function boxplot otherwise.

Author

Craig Wang

Details

For paired data, a xyplot is used. For unpiared data, a grouped boxplot is used.

Examples

Run this code
data(epgs)
plotCounts(epgs[,c("before","after")], paired = TRUE)

Run the code above in your browser using DataLab