Learn R Programming

pcvr (version 1.2.0)

checkGroups: Helper function to check groups in data.

Description

Helper function to check groups in data.

Usage

checkGroups(df, group)

Value

If there are duplicates in the grouping then this will return a message with code to start checking the duplicates in your data.

Arguments

df

Data frame to use.

group

Set of variables to use in grouping observations. These taken together should identify a unique plant (or unique plant at a unique angle) across time.

Examples

Run this code

df <- growthSim("linear",
  n = 10, t = 10,
  params = list("A" = c(2, 1.5))
)
checkGroups(df, c("time", "id", "group"))
df$time[12] <- 3
checkGroups(df, c("time", "id", "group"))

Run the code above in your browser using DataLab