Skip to content

Commit

Permalink
Avoid using fgeo.data
Browse files Browse the repository at this point in the history
  • Loading branch information
maurolepore committed Dec 27, 2018
1 parent 5ec52d6 commit bc98093
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/testthat/test-neighbor.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ pick_top <- function(.data, var, n = 1) {
.data[pulled %in% to_match, ]
}

tree <- fgeo.data::luquillo_tree5_random[1:10, ]
luquillo_tree5_random <- fgeo.x::download_data("luquillo_tree5_random")
luquillo_stem5_random <- fgeo.x::download_data("luquillo_stem5_random")
tree <- luquillo_tree5_random[1:10, ]

describe("neighbor_*() inputs", {
it("fails with informative messages when fed with common bad-inputs", {
Expand Down Expand Up @@ -46,7 +48,7 @@ describe("neighbor_*() inputs", {
})

it("warns if detects a stem (not tree) table", {
stem <- fgeo.data::luquillo_stem5_random
stem <- luquillo_stem5_random
expect_warning(abundance_neighbor(stem, r = 20), "Flagged values")
})
})
Expand Down Expand Up @@ -206,7 +208,7 @@ describe("neighbor_*() features", {
it("ouputs one row per row in the input", {
skip_if_not_installed("fgeo.misc")

tree <- fgeo.data::luquillo_tree5_random
tree <- luquillo_tree5_random
# Ungrouped
t <- suppressMessages(abundance_neighbor(tree, r = 20))
expect_equal(nrow(t), nrow(tree))
Expand All @@ -230,7 +232,7 @@ describe("neighbor_*() features", {
})

describe("neighbor_*()", {
quads <- pick_top(fgeo.data::luquillo_tree5_random, quadrat, 10)
quads <- pick_top(luquillo_tree5_random, quadrat, 10)
pd <- c(320, 500)
r <- 20
it("abundance_neighbor() outputs equal via group_by() and split()", {
Expand Down

0 comments on commit bc98093

Please sign in to comment.