make_experiment: Make an experiment

Description Usage Arguments Value Note

View source: R/create_experiments.R

Description

Make an experiment

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
make_experiment(
  experiment_type,
  clustered_sf,
  n_locations,
  config,
  plot_name,
  rotation_angle = NULL,
  block_cols = NULL,
  block_rows = NULL
)

Arguments

experiment_type

string; which experiment type should be created? Current options are "connected", which creates as single traditional experiment and expects the user to select only one centroid, or "disconnected" which expects the user to select the centroid of each block independently.

clustered_sf

sf; An sf object with a column cluster designating which cluster each polygon has been assigned to. Most like returned from finalize_clusters.

config

list; a named list containing all the needed inputs. The following must be included:

  • plot_length numeric; desired plot length in meters.

  • plot_width numeric; desired plot width in meters.

  • border_width numeric; desired width between plots in meters.

  • treatment_number integer; the number of treatments or plots that should be included in each block.

  • block_number integer; the number of blocks that should be included in each experiment.

plot_name

string; name that should be given to the figure. Do not include ".pdf". If no plotting directory has been given in the config, NULL should be passed.

rotation_angle

integer; **optional** angle by which the original experiment should be rotated. Default is NULL, which will result in plots oriented North-South.

block_cols

integer; **optional** for "connected" experiment, how many columns should the blocks be arranged into? block_cols*block_rows should be equal to config$block_number.

block_rows

integer; **optional** for "connected" experiment, how many rows should the blocks be arranged into? block_cols*block_rows should be equal to config$block_number.

Value

An sf object containing the polygons for each plot in an experiment.

Note

The CRS from clustered_sf will be used as the CRS to draw the polygons, therefore it is important that the CRS is in UTM.


smmueller/plotdesignr documentation built on Jan. 5, 2022, 10:55 a.m.