Nothing
# sportsR - A Comprehensive Collection of Sports and Athletics 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 <https://www.gnu.org/licenses/>.
# warriors_2019
library(testthat)
# Test 1: Check that the object is a data.frame and has 33 columns
test_that("warriors_2019 is a data.frame with 33 columns", {
expect_s3_class(warriors_2019, "data.frame")
expect_equal(ncol(warriors_2019), 33)
expect_equal(length(warriors_2019), 33)
})
# Test 2: Check the number of rows
test_that("warriors_2019 has 82 rows", {
expect_equal(nrow(warriors_2019), 82)
})
# Test 3: Validate column names
test_that("warriors_2019 has correct column names", {
expect_named(
warriors_2019,
c("Game", "Date", "Location", "Opp", "Win", "Points", "FG", "FGA",
"FG3", "FG3A", "FT", "FTA", "Rebounds", "OffReb", "Assists",
"Steals", "Blocks", "Turnovers", "Fouls", "OppPoints", "OppFG",
"OppFGA", "OppFG3", "OppFG3A", "OppFT", "OppFTA", "OppRebounds",
"OppOffReb", "OppAssists", "OppSteals", "OppBlocks", "OppTurnovers", "OppFouls")
)
})
# Test 4: Check data types
test_that("warriors_2019 has correct data types", {
expect_type(warriors_2019$Game, "integer")
expect_s3_class(warriors_2019$Date, "factor")
expect_type(warriors_2019$Date, "integer")
expect_equal(nlevels(warriors_2019$Date), 82)
expect_s3_class(warriors_2019$Location, "factor")
expect_type(warriors_2019$Location, "integer")
expect_equal(nlevels(warriors_2019$Location), 2)
expect_s3_class(warriors_2019$Opp, "factor")
expect_type(warriors_2019$Opp, "integer")
expect_equal(nlevels(warriors_2019$Opp), 29)
expect_s3_class(warriors_2019$Win, "factor")
expect_type(warriors_2019$Win, "integer")
expect_equal(nlevels(warriors_2019$Win), 2)
expect_type(warriors_2019$Points, "integer")
expect_type(warriors_2019$FG, "integer")
expect_type(warriors_2019$FGA, "integer")
expect_type(warriors_2019$FG3, "integer")
expect_type(warriors_2019$FG3A, "integer")
expect_type(warriors_2019$FT, "integer")
expect_type(warriors_2019$FTA, "integer")
expect_type(warriors_2019$Rebounds, "integer")
expect_type(warriors_2019$OffReb, "integer")
expect_type(warriors_2019$Assists, "integer")
expect_type(warriors_2019$Steals, "integer")
expect_type(warriors_2019$Blocks, "integer")
expect_type(warriors_2019$Turnovers, "integer")
expect_type(warriors_2019$Fouls, "integer")
expect_type(warriors_2019$OppPoints, "integer")
expect_type(warriors_2019$OppFG, "integer")
expect_type(warriors_2019$OppFGA, "integer")
expect_type(warriors_2019$OppFG3, "integer")
expect_type(warriors_2019$OppFG3A, "integer")
expect_type(warriors_2019$OppFT, "integer")
expect_type(warriors_2019$OppFTA, "integer")
expect_type(warriors_2019$OppRebounds, "integer")
expect_type(warriors_2019$OppOffReb, "integer")
expect_type(warriors_2019$OppAssists, "integer")
expect_type(warriors_2019$OppSteals, "integer")
expect_type(warriors_2019$OppBlocks, "integer")
expect_type(warriors_2019$OppTurnovers, "integer")
expect_type(warriors_2019$OppFouls, "integer")
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.