plot_strip: Plot Strip Design

Description Usage Arguments Value Examples

View source: R/hello.R

Description

Plot a design of an experiment with an Strip Plot design from agricolae design.strip

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
plot_strip(
  design,
  x = "col",
  y = "row",
  factor_name_1 = "T1",
  factor_name_2 = "T2",
  labels = "plots",
  width = 1,
  height = 1,
  space_width = 0.95,
  space_height = 0.85,
  reverse_y = FALSE,
  reverse_x = FALSE
)

Arguments

design

outdesign from agricolae package

x

Describes the x coordinates of a experiment design

y

Describes the y coordinates of a experiment design

factor_name_1

Which factor should be used for plotting, needs to be a column in outdesign$book

factor_name_2

Which factor should be used for plotting, needs to be a column in outdesign$book

labels

Describes the column from that the plots are taken to display them

width

numeric value, describes the width of a plot in an experiment

height

numeric value, describes the height of a plot in an experiment

space_width

numeric value, describes the share of the space of the plots. 0=only space, 1=no space between plots in term of width

space_height

numeric value, describes the share of the space of the plots. 0=only space, 1=no space between plots in term of height

reverse_y

boolean, should the plots of the experiment be changed in reverse order in Row direction? use reverse_y=TRUE to have same sketch as in agricolae. default:reverse_y=FALSE

reverse_x

boolean, should the plots of the experiment be changed in reverse order in column direction? default:reverse_x=FALSE

Value

ggplot graphic that can be modified, if wished

Examples

1
2
3
4
5
6
7
8
9
library(agricolaeplotr)
library(agricolae)
T1<-c('a','b','c','d')
T2<-c('v','w','x','y','z')
r = 3
outdesign <- design.strip(trt1=T1, trt2=T2, r=r,serie = 2,
 seed = 0, kinds = 'Super-Duper',randomization=TRUE)
plot_strip(outdesign,factor_name_1 = "T1",factor_name_2="T2")
plot_strip(outdesign,factor_name_1 = "T1",factor_name_2="T2",reverse_x = TRUE)

agricolaeplotr documentation built on July 21, 2021, 1:06 a.m.