Skip to contents

Constructing an experiment

These are the main functions used to set experiments from scratch.

design() redesign()
Start the edibble design
set_units()
Set units used in experiment
set_trts()
Set the treatment variables
allot_trts()
Define allotment of treatments to units
allot_units()
Define allotment of units to nested units
assign_trts() assign_units()
Assign treatments or units to units
serve_table()
Serve edibble table
allot_table()
Allot treatments to units and serve table
nested_in() conditioned_on()
Specify the nesting or conditional structure for units or treatments
crossed_by()
Specify the units to cross to index a new unit
order_trts()
A custom ordering algorithm

Understanding your design

Function helpers to understand your design better.

plot(<edbl_design>) plot(<edbl_table>) plot_fct_graph() plot_lvl_graph()
Interactive plot of the edibble design
examine_recipe()
Check the recipe code
simulate_process()
Simulation process
examine_process() examine_process_values()
Examine the simulation process
simulate_rcrds()
Simulate records
with_params()
This is a helper function to set the parameter values
autofill_rcrds()
Autofill the records
with_variables()
A helper function to set variables that the record is dependent on.
design_anatomy()
Anatomy of the design
design_model()
A baseline model for given experimental design

Named experimental designs

The recipe of a named experimental design is displayed using the menu_* functions. The takeout() allows you to get the design table from selected menu.

menu_bibd()
Balance incomplete block design
menu_crd()
Completely randomised design
menu_factorial()
Prepare a factorial design
menu_graeco()
Graeco-Latin Square Design
menu_hyper_graeco()
Hyper-Graeco-Latin Square Design
menu_lsd()
Prepare classical Latin square design
menu_rcbd()
Prepare a randomised complete block design
menu_split()
Split-unit design
menu_strip()
Strip-unit design
menu_youden()
Youden square design
scan_menu()
Find the short names of the named designs
takeout()
Create a named experimental design

Helper functions for creating orthogonal array structures.

latin_square() latin_rectangle() latin_array()
Latin square designs and its generalisations as an array

Exporting the experimental design

These help to create data validation rules and export the experimental layout as xlsx file.

set_rcrds() set_rcrds_of()
Set records for given unit
expect_rcrds()
Set the expected values for recording variables
to_be_numeric() to_be_integer() to_be_date() to_be_time() to_be_character() to_be_factor()
Expected type of data entry
with_value()
Validation values
export_design()
Export the design to xlsx

Experiment from existing data

These are functions relevant when making an experiment from existing data

new_edibble() as_edibble()
An edibble table constructor

Experiments

These are some example experiments.

lady_tasting_tea
Lady tasting tea
skittles
Skittles experiment

Table manipulators

These functions manipulate or wrangle the edibble table into another form.

pivot_wider_by()
Pivot factor to a wider list
split_by() count_by()
Split or count the data according to certain factors
trts_table()
Treatments table
as.data.frame(<edbl_table>)
Convert edibble table to normal data frame
as_tibble(<edbl_table>)
Convert an edibble data frame to normal data frame

Utility functions

These are mostly for internal usage and for those who wish to extend edibble functions.

Provenance
An object to query, record and modify an edibble graph
activate_provenance()
Activate the provenance in the edibble design object
nesting_structure()
Get the nesting structure for the units
set_attrs()
Set the experimental context as metadata
is_edibble_design() is_named_design() is_edibble_table() is_edibble_graph() is_edibble() is_edibble_levels() is_nest_levels() is_cross_levels() edbl_design() edbl_table()
Test and get edibble objects
fct_nodes() fct_edges() lvl_nodes() lvl_edges()
Get the node or edge data from an edibble design
fct() fct_attrs()
Setting the traits of factors
fct_generator()
Factor name generator
fct_graph()
Factor graph
lvls()
Setting the traits of the levels
edibble edibble-package
edibble: Encapsulating Elements of Experimental Design
new_edibble() as_edibble()
An edibble table constructor
print(<edbl_design>)
Print intermediate experimental design to terminal
as.character(<edbl_fct>) as.integer(<edbl_fct>) is_fct() is_unit() is_trt() is_rcrd()
Utility functions for edibble variable
is_takeout()
A function to check if the output is a takeout design
column()
Select a column.
is_provenance()
Check if an object is an instance of the "Provenance" class.
label_nested() label_distinct() index_levels()
Label with nested or distinct labels
label_seq_from_to() label_seq_from_length() label_seq_to_length() label_seq_length()
Generate a sequence of labels with custom formatting options
rescale_values()
Rescale a numerical vector