Skip to content

Commit

Permalink
propagate locus name changes to docs and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jsta committed Jul 16, 2020
1 parent ac01677 commit 0c04887
Show file tree
Hide file tree
Showing 22 changed files with 201 additions and 202 deletions.
10 changes: 5 additions & 5 deletions R/LAGOSUS-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ lagosus_version <- function(){
#'
#' @eval c("@details", get_table_metadata("locus", "lake_information"))
#'
#' @name locus_information
#' @name lake_information
#' @docType data
#' @keywords datasets
NULL
Expand All @@ -81,7 +81,7 @@ NULL
#'
#' @eval c("@details", get_table_metadata("locus", "lake_characteristics"))
#'
#' @name locus_characteristics
#' @name lake_characteristics
#' @docType data
#' @keywords datasets
NULL
Expand All @@ -93,7 +93,7 @@ NULL
#'
#' @eval c("@details", get_table_metadata("locus", "lake_watersheds"))
#'
#' @name locus_watersheds
#' @name lake_watersheds
#' @docType data
#' @keywords datasets
#' @aliases watersheds
Expand All @@ -108,7 +108,7 @@ NULL
#'
#' @eval c("@details", get_table_metadata("locus", "lake_link"))
#'
#' @name locus_link
#' @name lake_link
#' @docType data
#' @keywords datasets
NULL
Expand All @@ -117,7 +117,7 @@ NULL
#'
#' @eval get_table_metadata("locus", "source_table_locus")
#'
#' @name locus_source
#' @name source_table_locus
#' @docType data
#' @keywords datasets
NULL
Expand Down
2 changes: 1 addition & 1 deletion R/coordinates.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#' @export
#' @examples \dontrun{
#' dt <- lagosus_load("locus")
#' res <- coordinatize(dt$locus$locus_information)
#' res <- coordinatize(dt$locus$lake_information)
#'
#' library(maps)
#' map("state", xlim = c(-97.90363, -66.99892), ylim = c(34.61761, 49.41941))
Expand Down
8 changes: 4 additions & 4 deletions R/info.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ lake_info <- function(lagoslakeid = NA, name = NA, state = NA,
suppressWarnings(
name_state <- dplyr::left_join(
name_state,
dplyr::select(lg$locus$locus_information, .data$lagoslakeid,
dplyr::select(lg$locus$lake_information, .data$lagoslakeid,
.data$lake_centroidstate, .data$lake_namegnis,
.data$state_zoneid),
by = "lagoslakeid"))
Expand All @@ -79,16 +79,16 @@ lake_info <- function(lagoslakeid = NA, name = NA, state = NA,
}

locus_state_conn <- suppressMessages(dplyr::left_join(
lg$locus$locus_information,
dplyr::select(lg$locus$locus_characteristics,
lg$locus$lake_information,
dplyr::select(lg$locus$lake_characteristics,
.data$lake_connectivity_permanent, .data$lagoslakeid,
.data$lake_totalarea_ha),
by = c("lagoslakeid" = "lagoslakeid")
))

locus_state_iws <- suppressMessages(dplyr::left_join(
locus_state_conn,
dplyr::select(lg$locus$locus_watersheds,
dplyr::select(lg$locus$lake_watersheds,
.data$lagoslakeid, .data$ws_area_ha),
by = c("lagoslakeid" = "lagoslakeid")
))
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ names(lg)
#### Preview a table

```{r preview table, eval=FALSE}
head(lg$locus$locus_characteristics)
head(lg$locus$lake_characteristics)
```

#### Preview a specific lake
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ names(lg)
#### Preview a table

``` r
head(lg$locus$locus_characteristics)
head(lg$locus$lake_characteristics)
```

#### Preview a specific lake
Expand Down
2 changes: 1 addition & 1 deletion data-raw/create_test_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dt <- LAGOSUS::lagosus_load(modules = c("locus", "depth"))

# id 2 llids with non-missing chla data in two different states
set.seed(5)
llids <- dplyr::select(dt$locus$locus_information,
llids <- dplyr::select(dt$locus$lake_information,
lake_centroidstate, lagoslakeid) %>%
dplyr::filter(lake_centroidstate %in% c("MA", "IA")) %>%
group_by(lake_centroidstate) %>%
Expand Down
Binary file modified data/lg_subset.rda
Binary file not shown.
Binary file modified inst/lagos_test_subset.rds
Binary file not shown.
2 changes: 1 addition & 1 deletion man/coordinatize.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions man/lake_characteristics.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions man/lake_information.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0c04887

Please sign in to comment.