# agridatasets - A Comprehensive Collection of Agricultural and Agronomic Datasets # Version 0.1.0 # Copyright (C) 2026 Renzo Caceres Rossi # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # seed_germination library(testthat) # Test 1: Check that the object is a data.frame and has 5 columns test_that("seed_germination is a data.frame with 5 columns", { expect_s3_class(seed_germination, "data.frame") expect_equal(ncol(seed_germination), 5) expect_equal(length(seed_germination), 5) }) # Test 2: Check the number of rows test_that("seed_germination has 64 rows", { expect_equal(nrow(seed_germination), 64) }) # Test 3: Validate column names test_that("seed_germination has correct column names", { expect_named( seed_germination, c("temp", "rep", "conc", "germ", "seeds") ) }) # Test 4: Check data types test_that("seed_germination has correct data types", { expect_s3_class(seed_germination$temp, "factor") expect_equal(nlevels(seed_germination$temp), 4) expect_s3_class(seed_germination$rep, "factor") expect_equal(nlevels(seed_germination$rep), 4) expect_type(seed_germination$conc, "double") expect_type(seed_germination$germ, "integer") expect_type(seed_germination$seeds, "integer") })