Skip to content

Commit

Permalink
maybe a real test
Browse files Browse the repository at this point in the history
  • Loading branch information
wcornwell committed Nov 15, 2024
1 parent 5194198 commit cb8ae52
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tests/testthat/test-test_spectral.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
test_that("multiplication works", {
expect_equal(2 * 2, 4)
test_that("calculate_cv works", {
set.seed(123)
df <- data.frame(
site_name = rep(c("site_one", "site_two", "site_three", "site_four"), each = 5000),
aoi_id = 1,
blue = runif(20000, min = 0, max = 1),
green = runif(20000, min = 0, max = 1),
red = runif(20000, min = 0, max = 1),
red_edge = runif(20000, min = 0, max = 1),
nir = runif(20000, min = 0, max = 1))
pixelvalues <- calculate_cv(df,
wavelengths = c('blue','green','red','red_edge','nir'),
rarefaction = TRUE, min_points = 5000, n = 999)
})

0 comments on commit cb8ae52

Please sign in to comment.