Learn R Programming

biometryassist (version 1.3.1)

add_buffers: Add buffers to an existing design

Description

Add buffers to an existing design

Usage

add_buffers(design_obj, type)

Value

The modified design object with buffers added

Arguments

design_obj

A design object (with class "design") from the design() function

type

The type of buffer to add. One of 'edge', 'row', 'column', 'double row', or 'double column'.

Examples

Run this code
# Create a simple CRD design
des <- design(type = "crd", treatments = c("A", "B"), reps = 3, nrows = 2, ncols = 3, seed = 42)

# Plot the original design
autoplot(des)

# Add edge buffers to the design
des_buf <- add_buffers(des, type = "edge")

# Plot the design with buffers
autoplot(des_buf)

# Add double row buffers
des_row_buf <- add_buffers(des, type = "double row")
autoplot(des_row_buf)

Run the code above in your browser using DataLab