# agridatasets - A Comprehensive Collection of Agricultural and Agronomic Datasets # Version 0.1.1 # 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 . # eucalyptus_progenies library(testthat) # Test 1: Check that the object is a tibble/data.frame and has 4 columns test_that("eucalyptus_progenies is a tibble data.frame with 4 columns", { expect_s3_class(eucalyptus_progenies, "tbl_df") expect_s3_class(eucalyptus_progenies, "tbl") expect_s3_class(eucalyptus_progenies, "data.frame") expect_equal(ncol(eucalyptus_progenies), 4) expect_equal(length(eucalyptus_progenies), 4) }) # Test 2: Check the number of rows test_that("eucalyptus_progenies has 72 rows", { expect_equal(nrow(eucalyptus_progenies), 72) }) # Test 3: Validate column names test_that("eucalyptus_progenies has correct column names", { expect_named( eucalyptus_progenies, c("trati", "bloc", "exp", "resp") ) }) # Test 4: Check data types test_that("eucalyptus_progenies has correct data types", { expect_type(eucalyptus_progenies$trati, "character") expect_type(eucalyptus_progenies$bloc, "character") expect_type(eucalyptus_progenies$exp, "character") expect_type(eucalyptus_progenies$resp, "double") })