From eea9d3aeb5c750aef44bc534396efc02c9a718b8 Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Tue, 12 Jul 2022 21:26:55 -0500 Subject: [PATCH 1/2] one failing CRAN test --- DESCRIPTION | 4 ++-- tests/testthat/test_check_ncdf.R | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 0d91aac..bbc127d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: ncdfgeom Type: Package Title: 'NetCDF' Geometry and Time Series -Version: 1.1.2 +Version: 1.1.3 Date: 2021-04-22 Authors@R: c(person("David", "Blodgett", role = c("aut", "cre"), email = "dblodgett@usgs.gov"), @@ -16,4 +16,4 @@ Suggests: testthat, knitr, rmarkdown, pkgdown, geoknife, ncdf4, jsonlite, areal License: CC0 Encoding: UTF-8 VignetteBuilder: knitr -RoxygenNote: 7.1.2 +RoxygenNote: 7.2.0 diff --git a/tests/testthat/test_check_ncdf.R b/tests/testthat/test_check_ncdf.R index df12d32..33d95dd 100644 --- a/tests/testthat/test_check_ncdf.R +++ b/tests/testthat/test_check_ncdf.R @@ -77,7 +77,7 @@ test_that("a crs gets found correctly", { semi_major_axis = 6378137.0, inverse_flattening = 298.257223563, longitude_of_prime_meridian = 0) - expect_equal(checkVals$crs, crs) + expect_equal(checkVals$crs, crs[names(checkVals$crs)]) unlink("test.nc") }) From 3f503e833f0844bab354fff598951b29d447ab8e Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Wed, 13 Jul 2022 09:05:01 -0500 Subject: [PATCH 2/2] links and date --- DESCRIPTION | 2 +- R/calculate_area_intersection_weights.R | 2 +- R/check_netcdf.R | 3 --- R/write_geometry.R | 3 --- README.md | 2 +- man/calculate_area_intersection_weights.Rd | 2 +- 6 files changed, 4 insertions(+), 10 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index bbc127d..e808579 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -2,7 +2,7 @@ Package: ncdfgeom Type: Package Title: 'NetCDF' Geometry and Time Series Version: 1.1.3 -Date: 2021-04-22 +Date: 2022-07-13 Authors@R: c(person("David", "Blodgett", role = c("aut", "cre"), email = "dblodgett@usgs.gov"), person("Luke", "Winslow", role = "ctb")) diff --git a/R/calculate_area_intersection_weights.R b/R/calculate_area_intersection_weights.R index 650d184..c5138d4 100644 --- a/R/calculate_area_intersection_weights.R +++ b/R/calculate_area_intersection_weights.R @@ -7,7 +7,7 @@ #' #' This function is a lightwieght wrapper around the functions #' \link[areal]{aw_intersect} \link[areal]{aw_total} and \link[areal]{aw_weight} -#' from the \href{https://github.com/slu-openGIS/areal}{areal package}. +#' from the \href{https://chris-prener.github.io/areal/}{areal package}. #' #' @param x sf data.frame source features including one geometry column and one identifier column #' @param y sf data.frame target features including one geometry column and one identifier column diff --git a/R/check_netcdf.R b/R/check_netcdf.R index a51407d..26df9cb 100644 --- a/R/check_netcdf.R +++ b/R/check_netcdf.R @@ -1,8 +1,5 @@ #'@title Check NetCDF-DSG File -#' -#' #'@param nc A NetCDF path or URL to be opened. -#' #'@description #'Introspects a netCDF file and tries to interpret it as a NetCDF-DSG file. Returns a named #'\code{list} containing \code{instance_id} \code{instance_dim} \code{node_count} diff --git a/R/write_geometry.R b/R/write_geometry.R index ca34bcb..08e44ed 100644 --- a/R/write_geometry.R +++ b/R/write_geometry.R @@ -1,5 +1,4 @@ #' @title Write geometries and attributes to NetCDF-CF -#' #' @param nc_file \code{character} file path to the nc file to be created. #' @param geom_data sf \code{data.frame} with POINT, LINESTRING, MULTILINESTRING, #' POLYGON, or MULTIPOLYGON geometries. Note that three dimensional geometries @@ -67,8 +66,6 @@ write_geometry = function(nc_file, geom_data, instance_dim_name = NULL, variable } #'@title Put geometry data in a NetCDF-CF File -#' -#' #'@param nc_file A string file path to the nc file to be created. It must already have #'an instance dimension. #'@param geom_data An object of class \code{SpatialLines}, \code{SpatialPolygons} diff --git a/README.md b/README.md index 09abca6..c8bbebc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ NetCDF-CF Geometry and Timeseries Tools for R === -![R-CMD-check](https://github.com/usgs-r/ncdfgeom/workflows/R-CMD-check/badge.svg) [![codecov](https://codecov.io/gh/usgs-r/ncdfgeom/branch/master/graph/badge.svg?token=5c1L38yK5q)](https://codecov.io/gh/usgs-r/ncdfgeom) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/ncdfgeom)](https://cran.r-project.org/package=ncdfgeom) [![CRAN](https://www.r-pkg.org/badges/version/ncdfgeom)](https://cran.r-project.org/package=ncdfgeom) +![R-CMD-check](https://github.com/usgs-r/ncdfgeom/workflows/R-CMD-check/badge.svg) [![codecov](https://codecov.io/gh/usgs-r/ncdfgeom/branch/master/graph/badge.svg?token=5c1L38yK5q)](https://app.codecov.io/gh/usgs-r/ncdfgeom) [![CRAN Downloads](https://cranlogs.r-pkg.org/badges/grand-total/ncdfgeom)](https://cran.r-project.org/package=ncdfgeom) [![CRAN](https://www.r-pkg.org/badges/version/ncdfgeom)](https://cran.r-project.org/package=ncdfgeom) `ncdfgeom` reads and writes geometry data (points lines and polygons), attributes of geometries, and time series associated with the geometries in a standards-compliant way. diff --git a/man/calculate_area_intersection_weights.Rd b/man/calculate_area_intersection_weights.Rd index f93a1fa..0fcc6a8 100644 --- a/man/calculate_area_intersection_weights.Rd +++ b/man/calculate_area_intersection_weights.Rd @@ -29,7 +29,7 @@ weighted means are being generated for the target, y. This function is a lightwieght wrapper around the functions \link[areal]{aw_intersect} \link[areal]{aw_total} and \link[areal]{aw_weight} -from the \href{https://github.com/slu-openGIS/areal}{areal package}. +from the \href{https://chris-prener.github.io/areal/}{areal package}. } \examples{ b1 = sf::st_polygon(list(rbind(c(-1,-1), c(1,-1),