Last data update: 2014.03.03

R: Exploratory Graphs for Two Factor Designs
twoway.plotsR Documentation

Exploratory Graphs for Two Factor Designs

Description

Function creates side-by-side boxplots for each factor, a design plot (means), and an interaction plot.

Usage

twoway.plots(Y, fac1, fac2, COL = c("#A9E2FF", "#0080FF"))

Arguments

Y

response variable

fac1

factor one

fac2

factor two

COL

a vector with two colors

Author(s)

Alan T. Arnholt

See Also

oneway.plots

Examples

# Figure 11.25
Microamps <- c(280, 290, 285, 300, 310, 295, 270, 285, 290, 230,
235, 240, 260, 240, 235, 220, 225, 230)
Glass <- factor(c(rep("Glass I", 9), rep("Glass II", 9)))
Phosphor <- factor((rep(c(rep("Phosphor A", 3), rep("Phosphor B", 3),
rep("Phosphor C", 3)), 2)))
twoway.plots(Microamps,Glass,Phosphor)
rm(Microamps, Glass, Phosphor)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(PASWR)
Loading required package: e1071
Loading required package: MASS
Loading required package: lattice
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/PASWR/twoway.plots.Rd_%03d_medium.png", width=480, height=480)
> ### Name: twoway.plots
> ### Title: Exploratory Graphs for Two Factor Designs
> ### Aliases: twoway.plots
> ### Keywords: aplot
> 
> ### ** Examples
> 
> # Figure 11.25
> Microamps <- c(280, 290, 285, 300, 310, 295, 270, 285, 290, 230,
+ 235, 240, 260, 240, 235, 220, 225, 230)
> Glass <- factor(c(rep("Glass I", 9), rep("Glass II", 9)))
> Phosphor <- factor((rep(c(rep("Phosphor A", 3), rep("Phosphor B", 3),
+ rep("Phosphor C", 3)), 2)))
> twoway.plots(Microamps,Glass,Phosphor)
> rm(Microamps, Glass, Phosphor)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>