tests/testthat/test-hydro-metadata.R

context("hydro-metadata")

h_d <- hydro_metadata("daily")
h_m <- hydro_metadata("monthly")
h_a <- hydro_metadata("semiannual_and_annual")

test_that("hydro-metadata works!", {
  expect_equal(dim(h_d[[1]]), c(10, 1))
  expect_equal(dim(h_d[[2]]), c(10, 1))
  expect_equal(dim(h_m[[1]]), c(10, 1))
  expect_equal(dim(h_a[[1]]), c(16, 1))
  expect_equal(dim(h_a[[2]]), c(16, 1))
  expect_equal(dim(h_a[[3]]), c(16, 1))
})

Try the imgw package in your browser

Any scripts or data that you put into this service are public.

imgw documentation built on March 26, 2020, 7:37 p.m.