Skip to contents

Change the assigned rates by plot and strip

Usage

change_rates(
  td,
  input_name = NA,
  strip_ids,
  plot_ids = NULL,
  new_rates,
  rate_by = "all"
)

Arguments

td

trial design

input_name

(character) input name

strip_ids

(numeric) vector of strip_ids

plot_ids

(numeric) vector of plot_ids

new_rates

(numeric) single numeric number for `rate_by = "all"``, a vector of numeric values for `rate_by = "strip"``, a matrix of numeric numbers for `rate_by = "plot"`.

rate_by

(character) default is "all". The other options are "plot" and "strip".

Value

trial design with changed rates

Examples

#--- load rate information ---#
data(td_single_input)

#--- change rates of some strips ---#
strip_ids <- 1:5
plot_ids <- 5:10
new_rates <- 200

td_modified <- change_rates(td_single_input, "NH3", strip_ids, plot_ids, new_rates)

#--- visualize ---#
viz(td_modified)