Running ‘testthat.R’ [2s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(jpndistrict)
  Loading required package: jpmesh
  This package provide map data is based on the Digital Map 25000(Map
  Image) published by Geospatial Information Authorityof Japan (Approval
  No.603FY2017 information usage <http://www.gsi.go.jp>)
  > 
  > test_check("jpndistrict")
  ── 1. Error: prefecture (@test-find_city.R#5)  ─────────────────────────────────
  unknown input format
  1: find_pref(longitude = 130.4412895, latitude = 30.2984335) at testthat/test-find_city.R:5
  2: find_city(longitude, latitude, ...)
  3: which_pol_min(longitude, latitude, ...)
  4: find_prefs(longitude = longitude, latitude = latitude) %>% use_series(pref_code) %>% 
         purrr::map(jpn_pref) %>% purrr::reduce(rbind)
  5: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: `_fseq`(`_lhs`)
  9: freduce(value, `_function_list`)
  10: function_list[[i]](value)
  11: purrr::map(., jpn_pref)
  12: .f(.x[[i]], ...)
  13: readr::read_rds(system.file(paste0("extdata/ksj_n03/pref_", pref_code, ".rds"), package = "jpndistrict"))
  14: readRDS(path)
  
  ── 2. Error: city (@test-find_city.R#19)  ──────────────────────────────────────
  unknown input format
  1: find_city(longitude = 130.4412895, latitude = 30.2984335) at testthat/test-find_city.R:19
  2: which_pol_min(longitude, latitude, ...)
  3: find_prefs(longitude = longitude, latitude = latitude) %>% use_series(pref_code) %>% 
         purrr::map(jpn_pref) %>% purrr::reduce(rbind)
  4: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: `_fseq`(`_lhs`)
  8: freduce(value, `_function_list`)
  9: function_list[[i]](value)
  10: purrr::map(., jpn_pref)
  11: .f(.x[[i]], ...)
  12: readr::read_rds(system.file(paste0("extdata/ksj_n03/pref_", pref_code, ".rds"), package = "jpndistrict"))
  13: readRDS(path)
  
  ── 3. Error: jpn_pref (@test-spdf_jpn.R#5)  ────────────────────────────────────
  error reading from connection
  1: jpn_pref(pref_code = 33, district = TRUE, drop_sinkyokyoku = FALSE) at testthat/test-spdf_jpn.R:5
  2: readr::read_rds(system.file(paste0("extdata/ksj_n03/pref_", pref_code, ".rds"), package = "jpndistrict"))
  3: readRDS(path)
  
  ── 4. Error: jpn_cities (@test-spdf_jpn.R#27)  ─────────────────────────────────
  error reading from connection
  1: jpn_cities(jis_code = 33103) at testthat/test-spdf_jpn.R:27
  2: jis_code %>% purrr::map_chr(~substr(.x, 1, 2)) %>% unique() %>% purrr::map(~jpn_pref(pref_code = .x, 
         district = TRUE)) %>% purrr::reduce(rbind) %>% dplyr::select(-1:-2) %>% dplyr::select(city_code, 
         city, geometry)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: function_list[[i]](value)
  9: purrr::map(., ~jpn_pref(pref_code = .x, district = TRUE))
  10: .f(.x[[i]], ...)
  11: jpn_pref(pref_code = .x, district = TRUE)
  12: readr::read_rds(system.file(paste0("extdata/ksj_n03/pref_", pref_code, ".rds"), package = "jpndistrict"))
  13: readRDS(path)
  
  ── 5. Error: reverge-geo coding (@test-util.R#17)  ─────────────────────────────
  unknown input format
  1: which_pol_min(longitude = 130.4412895, latitude = 30.2984335) at testthat/test-util.R:17
  2: find_prefs(longitude = longitude, latitude = latitude) %>% use_series(pref_code) %>% 
         purrr::map(jpn_pref) %>% purrr::reduce(rbind)
  3: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  4: eval(quote(`_fseq`(`_lhs`)), env, env)
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: `_fseq`(`_lhs`)
  7: freduce(value, `_function_list`)
  8: function_list[[i]](value)
  9: purrr::map(., jpn_pref)
  10: .f(.x[[i]], ...)
  11: readr::read_rds(system.file(paste0("extdata/ksj_n03/pref_", pref_code, ".rds"), package = "jpndistrict"))
  12: readRDS(path)
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 5 SKIPPED: 0 FAILED: 5
  1. Error: prefecture (@test-find_city.R#5) 
  2. Error: city (@test-find_city.R#19) 
  3. Error: jpn_pref (@test-spdf_jpn.R#5) 
  4. Error: jpn_cities (@test-spdf_jpn.R#27) 
  5. Error: reverge-geo coding (@test-util.R#17) 
  
  Error: testthat unit tests failed
  Execution halted