diff --git a/R/downloading_tools.R b/R/downloading_tools.R index 4e005c78..3018dff3 100644 --- a/R/downloading_tools.R +++ b/R/downloading_tools.R @@ -6,7 +6,7 @@ #' @param download_files boolean if FALSE, only URLs to files will be returned #' can be hu02s and/or hu04s #' -#' @return Paths to geodatabases created. +#' @return character Paths to geodatabases created. #' @importFrom xml2 read_xml xml_ns_strip xml_find_all xml_text #' @importFrom utils download.file #' @importFrom zip unzip @@ -88,7 +88,7 @@ download_nhdplushr <- function(nhd_dir, hu_list, download_files = TRUE) { #' @param outdir The folder path where data should be downloaded and extracted #' @param url the location of the online resource #' @param progress boolean display download progress? -#' @return the path to the local geodatabase +#' @return character path to the local geodatabase #' @export #' @examples #' \dontrun{ @@ -130,7 +130,7 @@ download_nhdplusv2 <- function(outdir, #' https://prd-tnm.s3.amazonaws.com/StagedProducts/Hydrography/WBD/National/GDB/WBD_National_GDB.xml #' for metadata. #' @inheritParams download_nhdplusv2 -#' @return the path to the local geodatabase +#' @return character path to the local geodatabase #' @export #' @importFrom zip unzip #' @examples @@ -161,7 +161,7 @@ download_wbd <- function(outdir, #' @description This function downloads and decompresses staged RF1 data. #' See: https://water.usgs.gov/GIS/metadata/usgswrd/XML/erf1_2.xml for metadata. #' @inheritParams download_nhdplusv2 -#' @return the path to the local e00 file +#' @return character path to the local e00 file #' @export #' @examples #' \dontrun{ diff --git a/R/get_geometry.R b/R/get_geometry.R index 623eb6fd..359b14f4 100644 --- a/R/get_geometry.R +++ b/R/get_geometry.R @@ -4,6 +4,7 @@ #' @param x sf data.frame with one or more flowlines #' @param position character either "start" or "end" #' @export +#' @return sf data.frame containing requested nodes #' @importFrom sf st_crs st_coordinates st_as_sf #' @importFrom dplyr select group_by filter row_number n ungroup #' @examples diff --git a/R/get_hydro.R b/R/get_hydro.R index 4d9fa284..6384f01d 100644 --- a/R/get_hydro.R +++ b/R/get_hydro.R @@ -1,10 +1,9 @@ #' @title Find WBD HUC 08 unit subsets #' @description Subsets the WBD level 08 features by location (POINT), #' area (POLYGON), or set of IDs. -#' @inherit query_usgs_geoserver details +#' @inherit query_usgs_geoserver details return #' @inheritParams query_usgs_geoserver #' @param id WBD HUC08 ID(s) -#' @inherit query_usgs_geoserver return #' @export get_huc8 <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ @@ -15,10 +14,9 @@ get_huc8 <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ #' @title Find WBD HUC 12 unit subsets #' @description Subsets the WBD level 12 features by location (POINT), #' area (POLYGON), or set of IDs. -#' @inherit query_usgs_geoserver details +#' @inherit query_usgs_geoserver details return #' @inheritParams query_usgs_geoserver #' @param id WBD HUC12 ID(s) -#' @inherit query_usgs_geoserver return #' @export get_huc12 <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ @@ -29,10 +27,9 @@ get_huc12 <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ #' @title Find NHD Water Bodies #' @description Subsets NHD waterbody features by location (POINT), #' area (POLYGON), or set of IDs. -#' @inherit query_usgs_geoserver details +#' @inherit query_usgs_geoserver details return #' @inheritParams query_usgs_geoserver #' @param id NHD Waterbody COMID(s) -#' @inherit query_usgs_geoserver return #' @export get_waterbodies <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ @@ -45,10 +42,9 @@ get_waterbodies <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ #' @title Find NHD Areas #' @description Subsets NHD Area features by location (POINT), #' area (POLYGON), or set of IDs. -#' @inherit query_usgs_geoserver details +#' @inherit query_usgs_geoserver details return #' @inheritParams query_usgs_geoserver #' @param id NHD Area COMID(s) -#' @inherit query_usgs_geoserver return #' @export get_nhdarea <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ @@ -60,10 +56,9 @@ get_nhdarea <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ #' @title Find GAGESII Features #' @description Subsets the gagesII dataset by location (POINT), #' area (POLYGON), or set of IDs. -#' @inherit query_usgs_geoserver details +#' @inherit query_usgs_geoserver details return #' @inheritParams query_usgs_geoserver #' @param id NWIS Gage ID(s) -#' @inherit query_usgs_geoserver return #' @export get_gagesII <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ @@ -75,12 +70,11 @@ get_gagesII <- function(AOI = NULL, id = NULL, t_srs = NULL, buffer = .5){ #' @description Returns a POINT feature class of active, stream network, #' NWIS gages for an Area of Interest. If a POINT feature is used as an AOI, #' then the returned sites within the requested buffer, are sorted by distance (in meters) from that POINT. -#' @inherit query_usgs_geoserver details +#' @inherit query_usgs_geoserver details return #' @inheritParams query_usgs_geoserver #' @param buffer numeric. The amount (in meters) to buffer a POINT AOI by #' for an extended search. Default = 20,000. Returned results are arrange #' by distance from POINT AOI -#' @inherit query_usgs_geoserver return #' @importFrom xml2 xml_root xml_children xml_attr read_xml #' @importFrom sf st_geometry_type st_transform st_buffer st_as_sf #' st_bbox st_nearest_feature st_distance diff --git a/R/get_nhdplus.R b/R/get_nhdplus.R index 1e24f882..72d29ced 100644 --- a/R/get_nhdplus.R +++ b/R/get_nhdplus.R @@ -14,7 +14,7 @@ #' @param realization character. What realization to return. #' Default is flowline and options include: outlet, flowline, catchment, #' and all -#' @return a single, or list, of simple feature objects +#' @return sfc a single, or list, of simple feature objects #' @examples #' \donttest{ #' point <- sf::st_sfc(sf::st_point(c(-119.845, 34.4146)), crs = 4326) diff --git a/R/get_nhdplushr.R b/R/get_nhdplushr.R index 773f2ab3..2c824b42 100644 --- a/R/get_nhdplushr.R +++ b/R/get_nhdplushr.R @@ -19,7 +19,7 @@ #' all will be kept. #' @param ... parameters passed along to \link{get_hr_data} #' for "NHDFlowline" layers. -#' @return Response is a list of sf data.frames containing output that may also be written +#' @return sf data.frames containing output that may also be written #' to a geopackage for later use. #' @details #' NHDFlowline is joined to value added attributes prior to being @@ -115,6 +115,7 @@ get_nhdplushr <- function(hr_dir, out_gpkg = NULL, #' @param rename boolean if TRUE, nhdplusTools standard attribute values will #' be applied. #' @export +#' @return sf data.frame containing requested data #' @importFrom sf st_transform st_simplify st_crs st_drop_geometry st_geometry #' @importFrom sf st_cast st_multilinestring st_zm st_geometry<- #' @importFrom dplyr select group_by filter ungroup distinct @@ -187,6 +188,7 @@ cull_cols <- function(x, keep_cols) { #' @param flowlines sf data.frame of NHDPlusHR flowlines. #' @importFrom sf st_zm write_sf st_drop_geometry #' @importFrom dplyr group_by filter select +#' @return sf data.frame containing standalone network #' @export #' @examples #' \donttest{ diff --git a/R/get_nldi.R b/R/get_nldi.R index f495970f..a470e6ac 100644 --- a/R/get_nldi.R +++ b/R/get_nldi.R @@ -2,6 +2,7 @@ #' @description Provides access to metadata for characteristics that are returned by `get_nldi_characteristics()`. #' @param type character "all", "local", "total", or "divergence_routed". #' @export +#' @return data.frame containing available characteristics #' @examples #' chars <- discover_nldi_characteristics() #' names(chars) @@ -143,7 +144,7 @@ get_nldi_basin <- function(nldi_feature) { #' @title Get NLDI Feature #' @description Get a single feature from the NLDI #' @inheritParams navigate_nldi -#' @return sf feature collection with one feature +#' @return sf data.frame with one feature #' @examples #' \donttest{ #' get_nldi_feature(list("featureSource" = "nwissite", featureID = "USGS-05428500")) @@ -160,6 +161,7 @@ get_nldi_feature <- function(nldi_feature) { #' Metadata for these characteristics can be found using `discover_nldi_characteristics()`. #' @inheritParams navigate_nldi #' @inheritParams discover_nldi_characteristics +#' @return data.frame contianing requested characteristics #' @export #' @examples #' chars <- get_nldi_characteristics(list(featureSource = "nwissite", featureID = "USGS-05429700")) diff --git a/R/get_paths.R b/R/get_paths.R index 4e036128..2cf41e33 100644 --- a/R/get_paths.R +++ b/R/get_paths.R @@ -301,6 +301,7 @@ get_sorted <- function(x) { #' @param x two column data.frame with IDs and toIDs. Names are ignored. #' @param outlets IDs of outlet flowlines #' @export +#' @return data.frame containing the terminal ID for each outlet #' @importFrom igraph dfs graph_from_data_frame V #' @importFrom sf st_drop_geometry #' @importFrom tidyr unnest @@ -351,6 +352,7 @@ get_terminal <- function(x, outlets) { #' @importFrom dplyr arrange #' @importFrom methods as #' @export +#' @return data.frame containing levelpaths for each ID #' @examples #' source(system.file("extdata", "walker_data.R", package = "nhdplusTools")) #' diff --git a/R/get_vaa.R b/R/get_vaa.R index 36653e9e..6fccbd4a 100644 --- a/R/get_vaa.R +++ b/R/get_vaa.R @@ -4,7 +4,7 @@ #' file path to the cached file. Will use the user data dir indicated #' by \link{nhdplusTools_data_dir}. #' @inherit download_vaa details -#' @return file.path character +#' @return character file path #' @export #' @examples #' get_vaa_path() @@ -105,7 +105,7 @@ check_vaa_path <- function(path = get_vaa_path(), download = TRUE) { #' \href{https://www.hydroshare.org/resource/6092c8a62fac45be97a09bfd0b0bf726/}{here} #' @inheritParams get_vaa #' @param force logical. Force data re-download. Default = FALSE -#' @return path to cached data +#' @return character path to cached data #' @export #' @importFrom httr GET progress write_disk diff --git a/R/index_nhdplus.R b/R/index_nhdplus.R index c8765099..5872ce40 100644 --- a/R/index_nhdplus.R +++ b/R/index_nhdplus.R @@ -62,6 +62,8 @@ matcher <- function(coords, points, search_radius, max_matches = 1) { #' Note 4: See `dfMaxLength` input to sf::st_segmentize() for details of #' handling of precision parameter. #' +#' Note 5: "from" is downstream -- 0 is the outlet "to" is upstream -- 100 is the inlet +#' #' @importFrom dplyr filter select mutate right_join left_join #' @importFrom dplyr group_by summarise distinct desc lag n arrange #' @importFrom RANN nn2 @@ -229,7 +231,7 @@ get_flowline_index <- function(flines, points, #' @param hydro_location data.frame with two columns. The first should join to the #' id field of the indexes and the second should be the numeric or ascii metric such as drainage #' area or GNIS Name.. Names of this data,frame are not used. -#' @return The indexes data.frame deduplicated according to the minimum difference +#' @return data.frame indexes deduplicated according to the minimum difference #' between the values in the metric columns. If two or more result in the same "minimum" #' value, duplicates will be returned. #' @export @@ -517,6 +519,7 @@ add_len <- function(x) { #' @param measure numeric reach measure between 0 and 100 #' @param from numeric flowline from-measure relative to the reach #' @param to numeric flowline to-measure relative to the reach +#' @return numeric rescaled measure #' @export #' @examples #' rescale_measures(40, 0, 50) diff --git a/R/nhdplusTools.R b/R/nhdplusTools.R index e9dab0c7..e8174e9c 100644 --- a/R/nhdplusTools.R +++ b/R/nhdplusTools.R @@ -194,7 +194,7 @@ assign("nhdpt_dat_dir", #' @description if left unset, will return the user data dir #' as returned by \link[tools]{R_user_dir} for this package. #' @param dir path of desired data directory -#' @return path of data directory (silent when setting) +#' @return character path of data directory (silent when setting) #' @importFrom tools R_user_dir #' @export #' @examples @@ -230,7 +230,7 @@ nhdplusTools_data_dir <- function(dir = NULL) { #' geodatabase or geopackage format. #' @param path character path ending in .gdb or .gpkg #' @param warn boolean controls whether warning an status messages are printed -#' @return 1 if set successfully, the path if no input. +#' @return 0 (invisibly) if set successfully, character path if no input. #' @export #' @examples #' nhdplus_path("/data/NHDPlusV21_National_Seamless.gdb") @@ -260,7 +260,7 @@ nhdplus_path <- function(path = NULL, warn = FALSE) { #' @title Align NHD Dataset Names #' @description this function takes any NHDPlus dataset and aligns the attribute names with those used in nhdplusTools. #' @param x a \code{sf} object of nhdplus flowlines -#' @return a renamed \code{sf} object +#' @return data.frame renamed \code{sf} object #' @export #' @examples #' source(system.file("extdata/new_hope_data.R", package = "nhdplusTools")) diff --git a/R/plot_nhdplus.R b/R/plot_nhdplus.R index 4ee66275..f837a47c 100644 --- a/R/plot_nhdplus.R +++ b/R/plot_nhdplus.R @@ -12,7 +12,7 @@ #' @param actually_plot boolean actually draw the plot? Use to get data subset only. #' @param flowline_only boolean only subset and plot flowlines? #' @param ... parameters passed on to rosm. -#' @return plot data is returned invisibly in NAD83 Lat/Lon. +#' @return data.frame plot data is returned invisibly in NAD83 Lat/Lon. #' @details plot_nhdplus supports several input specifications. An unexported function "as_outlet" #' is used to convert the outlet formats as described below. #' \enumerate{ diff --git a/R/prep_nhdplus.R b/R/prep_nhdplus.R index cdf99d49..3a64b688 100644 --- a/R/prep_nhdplus.R +++ b/R/prep_nhdplus.R @@ -18,7 +18,6 @@ #' @param skip_toCOMID boolean if TRUE, toCOMID will not be added to output. #' @return data.frame ready to be used with the refactor_flowlines function. #' @importFrom dplyr select filter left_join group_split group_by bind_rows -#' @family refactor functions #' @export #' @examples #' diff --git a/R/run_plus_attributes.R b/R/run_plus_attributes.R index b1b552af..a1f841c3 100644 --- a/R/run_plus_attributes.R +++ b/R/run_plus_attributes.R @@ -85,6 +85,7 @@ combine_networks <- function(lp) { #' split into independent sub-networks. If it exists, it will be read from disk #' rather than recreated. #' @param status logical should progress be printed? +#' @return data.frame with added attributes #' @export #' @examples #' diff --git a/R/subset_nhdplus.R b/R/subset_nhdplus.R index c7693113..adca1b21 100644 --- a/R/subset_nhdplus.R +++ b/R/subset_nhdplus.R @@ -35,7 +35,7 @@ #' and subject to revision. It does not include as many layers and may not #' be available permenently. #' -#' @return path to the saved subset geopackage +#' @return character path to the saved subset geopackage #' @export #' @examples #' \donttest{ @@ -667,6 +667,7 @@ get_flowline_layer_name <- function(nhdplus_data) { #' @param rpu character e.g. "01a" #' @param run_make_standalone boolean should the run_make_standalone function be run on result? #' @export +#' @return data.frame containing subset network #' @importFrom dplyr filter arrange summarize #' @importFrom sf st_sf st_drop_geometry #' @examples diff --git a/man/add_plus_network_attributes.Rd b/man/add_plus_network_attributes.Rd index 31eac0d7..4b2bc161 100644 --- a/man/add_plus_network_attributes.Rd +++ b/man/add_plus_network_attributes.Rd @@ -29,6 +29,9 @@ rather than recreated.} \item{status}{logical should progress be printed?} } +\value{ +data.frame with added attributes +} \description{ Given a river network with required base attributes, adds the NHDPlus network attributes: hydrosequence, levelpath, terminalpath, pathlength, diff --git a/man/align_nhdplus_names.Rd b/man/align_nhdplus_names.Rd index 70875f07..5da98e62 100644 --- a/man/align_nhdplus_names.Rd +++ b/man/align_nhdplus_names.Rd @@ -10,7 +10,7 @@ align_nhdplus_names(x) \item{x}{a \code{sf} object of nhdplus flowlines} } \value{ -a renamed \code{sf} object +data.frame renamed \code{sf} object } \description{ this function takes any NHDPlus dataset and aligns the attribute names with those used in nhdplusTools. diff --git a/man/disambiguate_flowline_indexes.Rd b/man/disambiguate_flowline_indexes.Rd index 64e2f8f8..f3ece7d3 100644 --- a/man/disambiguate_flowline_indexes.Rd +++ b/man/disambiguate_flowline_indexes.Rd @@ -19,7 +19,7 @@ id field of the indexes and the second should be the numeric or ascii metric suc area or GNIS Name.. Names of this data,frame are not used.} } \value{ -The indexes data.frame deduplicated according to the minimum difference +data.frame indexes deduplicated according to the minimum difference between the values in the metric columns. If two or more result in the same "minimum" value, duplicates will be returned. } diff --git a/man/discover_nldi_characteristics.Rd b/man/discover_nldi_characteristics.Rd index 5b16b0a2..36361270 100644 --- a/man/discover_nldi_characteristics.Rd +++ b/man/discover_nldi_characteristics.Rd @@ -9,6 +9,9 @@ discover_nldi_characteristics(type = "all") \arguments{ \item{type}{character "all", "local", "total", or "divergence_routed".} } +\value{ +data.frame containing available characteristics +} \description{ Provides access to metadata for characteristics that are returned by `get_nldi_characteristics()`. } diff --git a/man/download_nhdplushr.Rd b/man/download_nhdplushr.Rd index 70cf9041..7e93b340 100644 --- a/man/download_nhdplushr.Rd +++ b/man/download_nhdplushr.Rd @@ -17,7 +17,7 @@ and four digit codes.} can be hu02s and/or hu04s} } \value{ -Paths to geodatabases created. +character Paths to geodatabases created. } \description{ Download NHDPlus HiRes diff --git a/man/download_nhdplusv2.Rd b/man/download_nhdplusv2.Rd index 0b91b3b1..06ee0b65 100644 --- a/man/download_nhdplusv2.Rd +++ b/man/download_nhdplusv2.Rd @@ -19,7 +19,7 @@ download_nhdplusv2( \item{progress}{boolean display download progress?} } \value{ -the path to the local geodatabase +character path to the local geodatabase } \description{ This function downloads and decompresses staged seamless NHDPlusV2 data. diff --git a/man/download_rf1.Rd b/man/download_rf1.Rd index b98ce538..c07041a9 100644 --- a/man/download_rf1.Rd +++ b/man/download_rf1.Rd @@ -18,7 +18,7 @@ download_rf1( \item{progress}{boolean display download progress?} } \value{ -the path to the local e00 file +character path to the local e00 file } \description{ This function downloads and decompresses staged RF1 data. diff --git a/man/download_vaa.Rd b/man/download_vaa.Rd index 55e43f2e..9f3a3d09 100644 --- a/man/download_vaa.Rd +++ b/man/download_vaa.Rd @@ -14,7 +14,7 @@ Also see: \link{get_vaa_path}} \item{force}{logical. Force data re-download. Default = FALSE} } \value{ -path to cached data +character path to cached data } \description{ downloads and caches nhdplusVAA data on your computer diff --git a/man/download_wbd.Rd b/man/download_wbd.Rd index c1e44bb9..416514b6 100644 --- a/man/download_wbd.Rd +++ b/man/download_wbd.Rd @@ -19,7 +19,7 @@ download_wbd( \item{progress}{boolean display download progress?} } \value{ -the path to the local geodatabase +character path to the local geodatabase } \description{ This function downloads and decompresses staged seamless WBD data. diff --git a/man/get_flowline_index.Rd b/man/get_flowline_index.Rd index 4394406a..d439fb6a 100644 --- a/man/get_flowline_index.Rd +++ b/man/get_flowline_index.Rd @@ -52,6 +52,8 @@ the flowlines. Note 4: See `dfMaxLength` input to sf::st_segmentize() for details of handling of precision parameter. + +Note 5: "from" is downstream -- 0 is the outlet "to" is upstream -- 100 is the inlet } \examples{ \donttest{ diff --git a/man/get_hr_data.Rd b/man/get_hr_data.Rd index ca67e6b2..fa48141a 100644 --- a/man/get_hr_data.Rd +++ b/man/get_hr_data.Rd @@ -27,6 +27,9 @@ get_hr_data( \item{rename}{boolean if TRUE, nhdplusTools standard attribute values will be applied.} } +\value{ +sf data.frame containing requested data +} \description{ Use to remove unwanted detail NHDPlusHR data See \link{get_nhdplushr} for examples. diff --git a/man/get_nhdplus.Rd b/man/get_nhdplus.Rd index dcc0bcbf..8a75839a 100644 --- a/man/get_nhdplus.Rd +++ b/man/get_nhdplus.Rd @@ -37,7 +37,7 @@ A user specified - target -Spatial Reference System (SRS/CRS) for returned objec Will default to the CRS of the input AOI if provided, and to 4326 for ID requests.} } \value{ -a single, or list, of simple feature objects +sfc a single, or list, of simple feature objects } \description{ Subsets NHDPlusV2 features by location (POINT), area (POLYGON), diff --git a/man/get_nhdplushr.Rd b/man/get_nhdplushr.Rd index 006b8902..f6fffa14 100644 --- a/man/get_nhdplushr.Rd +++ b/man/get_nhdplushr.Rd @@ -45,7 +45,7 @@ all will be kept.} for "NHDFlowline" layers.} } \value{ -Response is a list of sf data.frames containing output that may also be written +sf data.frames containing output that may also be written to a geopackage for later use. } \description{ diff --git a/man/get_nldi_characteristics.Rd b/man/get_nldi_characteristics.Rd index 160810dd..380a6c78 100644 --- a/man/get_nldi_characteristics.Rd +++ b/man/get_nldi_characteristics.Rd @@ -14,6 +14,9 @@ from the specified `featureSource`.} \item{type}{character "all", "local", "total", or "divergence_routed".} } +\value{ +data.frame contianing requested characteristics +} \description{ Retrieves catchment characteristics from the Network Linked Data Index. Metadata for these characteristics can be found using `discover_nldi_characteristics()`. diff --git a/man/get_nldi_feature.Rd b/man/get_nldi_feature.Rd index 83ad193a..40528c5f 100644 --- a/man/get_nldi_feature.Rd +++ b/man/get_nldi_feature.Rd @@ -13,7 +13,7 @@ dataRetrieval::get_nldi_sources() and the `featureSource` is a known identifier from the specified `featureSource`.} } \value{ -sf feature collection with one feature +sf data.frame with one feature } \description{ Get a single feature from the NLDI diff --git a/man/get_node.Rd b/man/get_node.Rd index ff0cb06c..ae4fcfae 100644 --- a/man/get_node.Rd +++ b/man/get_node.Rd @@ -11,6 +11,9 @@ get_node(x, position = "end") \item{position}{character either "start" or "end"} } +\value{ +sf data.frame containing requested nodes +} \description{ Given one or more flowlines, returns a particular node from the flowline. diff --git a/man/get_pathlength.Rd b/man/get_pathlength.Rd index b021d73e..9c7e911a 100644 --- a/man/get_pathlength.Rd +++ b/man/get_pathlength.Rd @@ -9,6 +9,9 @@ get_pathlength(x) \arguments{ \item{x}{data.frame with ID, toID, length columns.} } +\value{ +data.frame containing levelpaths for each ID +} \description{ Generates the main path length to a basin's terminal path. diff --git a/man/get_terminal.Rd b/man/get_terminal.Rd index 2bc6359d..62bcd688 100644 --- a/man/get_terminal.Rd +++ b/man/get_terminal.Rd @@ -11,6 +11,9 @@ get_terminal(x, outlets) \item{outlets}{IDs of outlet flowlines} } +\value{ +data.frame containing the terminal ID for each outlet +} \description{ Get the ID of the basin outlet for each flowline. } diff --git a/man/get_vaa_path.Rd b/man/get_vaa_path.Rd index 055b6990..0f9edc77 100644 --- a/man/get_vaa_path.Rd +++ b/man/get_vaa_path.Rd @@ -7,7 +7,7 @@ get_vaa_path() } \value{ -file.path character +character file path } \description{ nhdplusTools will download and cache an `fst` file with diff --git a/man/make_standalone.Rd b/man/make_standalone.Rd index df8e4b04..300421d2 100644 --- a/man/make_standalone.Rd +++ b/man/make_standalone.Rd @@ -9,6 +9,9 @@ make_standalone(flowlines) \arguments{ \item{flowlines}{sf data.frame of NHDPlusHR flowlines.} } +\value{ +sf data.frame containing standalone network +} \description{ Cleans up and prepares NHDPlusHR regional data for use as complete NHDPlus data. The primary modification applied is to ensure that any flowpath that exits the diff --git a/man/nhdplusTools_data_dir.Rd b/man/nhdplusTools_data_dir.Rd index 88e32b34..7d7cbc01 100644 --- a/man/nhdplusTools_data_dir.Rd +++ b/man/nhdplusTools_data_dir.Rd @@ -10,7 +10,7 @@ nhdplusTools_data_dir(dir = NULL) \item{dir}{path of desired data directory} } \value{ -path of data directory (silent when setting) +character path of data directory (silent when setting) } \description{ if left unset, will return the user data dir diff --git a/man/nhdplus_path.Rd b/man/nhdplus_path.Rd index 166eb685..a0a4531a 100644 --- a/man/nhdplus_path.Rd +++ b/man/nhdplus_path.Rd @@ -12,7 +12,7 @@ nhdplus_path(path = NULL, warn = FALSE) \item{warn}{boolean controls whether warning an status messages are printed} } \value{ -1 if set successfully, the path if no input. +0 (invisibly) if set successfully, character path if no input. } \description{ Allows specification of a custom path to a source dataset. diff --git a/man/plot_nhdplus.Rd b/man/plot_nhdplus.Rd index ffd1c4f8..dc911b56 100644 --- a/man/plot_nhdplus.Rd +++ b/man/plot_nhdplus.Rd @@ -42,7 +42,7 @@ plot_nhdplus( \item{...}{parameters passed on to rosm.} } \value{ -plot data is returned invisibly in NAD83 Lat/Lon. +data.frame plot data is returned invisibly in NAD83 Lat/Lon. } \description{ Given a list of outlets, get their basin boundaries and network and return a plot in diff --git a/man/prepare_nhdplus.Rd b/man/prepare_nhdplus.Rd index 7c903b7b..4f126590 100644 --- a/man/prepare_nhdplus.Rd +++ b/man/prepare_nhdplus.Rd @@ -56,4 +56,3 @@ prepare_nhdplus(sample_flines, warn = FALSE) } -\concept{refactor functions} diff --git a/man/rescale_measures.Rd b/man/rescale_measures.Rd index cf480579..5ee35953 100644 --- a/man/rescale_measures.Rd +++ b/man/rescale_measures.Rd @@ -13,6 +13,9 @@ rescale_measures(measure, from, to) \item{to}{numeric flowline to-measure relative to the reach} } +\value{ +numeric rescaled measure +} \description{ Given a reachcode measure and the from and to measure for a comid flowline, returns the measure along the comid flowline. This is diff --git a/man/subset_nhdplus.Rd b/man/subset_nhdplus.Rd index b86543b2..4713884a 100644 --- a/man/subset_nhdplus.Rd +++ b/man/subset_nhdplus.Rd @@ -52,7 +52,7 @@ Not implemented for local data.} \item{out_prj}{character override the default output CRS of NAD83 lat/lon (EPSG:4269)} } \value{ -path to the saved subset geopackage +character path to the saved subset geopackage } \description{ Saves a subset of the National Seamless database or other diff --git a/man/subset_rpu.Rd b/man/subset_rpu.Rd index 31df6e40..ff92f732 100644 --- a/man/subset_rpu.Rd +++ b/man/subset_rpu.Rd @@ -14,6 +14,9 @@ LevelPathI, RPUID, ToNode, FromNode, and ArbolateSu.} \item{run_make_standalone}{boolean should the run_make_standalone function be run on result?} } +\value{ +data.frame containing subset network +} \description{ Given flowlines and an rpu_code, performs a network-safe subset such that the result can be used in downstream processing. Has been tested to work diff --git a/vignettes/nhdplusTools.Rmd b/vignettes/nhdplusTools.Rmd index ea77d44b..694dbe95 100644 --- a/vignettes/nhdplusTools.Rmd +++ b/vignettes/nhdplusTools.Rmd @@ -107,7 +107,7 @@ library(nhdplusTools) ## Data and Package Basics -The first thing you are going to need to do is go get some data to work with. `nhdplusTools` provides the ability to download small subsets of the NHDPlus as described in the [Discovery and Subsetting](#discovery_subsetting) section. For large subsets, greater than a few thousand square kilometers, you can download the [National Seamless database at this web page.](https://www.epa.gov/waterdata/nhdplus-national-data) You will need [7z](https://www.7-zip.org/) or the [`archive` package](https://github.com/jimhester/archive) to extract it. +The first thing you are going to need to do is go get some data to work with. `nhdplusTools` provides the ability to download small subsets of the NHDPlus as described in the [Discovery and Subsetting](#discovery_subsetting) section. For large subsets, greater than a few thousand square kilometers, you can download the [National Seamless database at this web page.](https://www.epa.gov/waterdata/nhdplus-national-data) You will need [7z](https://www.7-zip.org/) or the [`archive` package](https://github.com/r-lib/archive) to extract it. If you are working with the whole National Seamless database, `nhdplusTools` has some convenience functions you should be aware of. Once you have it downloaded and extracted, you can tell the nhdplusTools package where it is with the `nhdplus_path()` function.