is.obs | R Documentation |
Check format of observation list
is.obs(obs_list)
obs_list |
List of observed values to check |
TRUE if obs_list has the good format, FALSE otherwise (+ warnings)
obs_list <- list(
sit1 = data.frame(
Date = as.POSIXct(c("2009-11-30", "2009-12-10")),
var1 = c(1.1, 1.5), var2 = c(NA, 2.1)
),
sit2 = data.frame(
Date = as.POSIXct(c("2009-11-30", "2009-12-5")),
var1 = c(1.3, 2)
)
)
# CroptimizR:::is.obs(obs_list)
# Missing Date column
obs_list <- list(
sit1 = data.frame(var1 = c(1.1, 1.5), var2 = c(NA, 2.1)),
sit2 = data.frame(
Date = as.POSIXct(c("2009-11-30", "2009-12-5")),
var1 = c(1.3, 2)
)
)
# CroptimizR:::is.obs(obs_list)
# Bad Date format
obs_list <- list(
sit1 = data.frame(
Date = c("2009-11-30", "2009-12-10"), var1 = c(1.1, 1.5),
var2 = c(NA, 2.1)
),
sit2 = data.frame(Date = c("2009-11-30", "2009-12-5"), var1 = c(1.3, 2))
)
# CroptimizR:::is.obs(obs_list)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.