Skip to content

Commit

Permalink
version 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
smwoodman authored and cran-robot committed May 27, 2021
1 parent 054f599 commit fead271
Show file tree
Hide file tree
Showing 11 changed files with 715 additions and 1,074 deletions.
9 changes: 4 additions & 5 deletions DESCRIPTION
@@ -1,6 +1,6 @@
Package: swfscDAS
Title: Southwest Fisheries Science Center Shipboard DAS Data Processing
Version: 0.5.0
Version: 0.5.1
Authors@R:
person("Sam", "Woodman", email = "sam.woodman@noaa.gov", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-6071-8186"))
Description: Process and summarize shipboard
Expand All @@ -12,18 +12,17 @@ Description: Process and summarize shipboard
URL: https://smwoodman.github.io/swfscDAS/,
https://github.com/smwoodman/swfscDAS/
BugReports: https://github.com/smwoodman/swfscDAS/issues/
Depends: R (>= 3.5.0)
Depends: R (>= 4.0.0)
Imports: dplyr, lubridate, magrittr, methods, parallel, purrr, readr,
rlang, sf, swfscMisc, tidyr
Suggests: knitr, rmarkdown, stringr, testthat (>= 2.1.0)
License: GPL-3
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.1
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2021-01-07 03:21:00 UTC; sam.woodman
Packaged: 2021-05-27 15:49:48 UTC; sam.woodman
Author: Sam Woodman [aut, cre] (<https://orcid.org/0000-0001-6071-8186>)
Maintainer: Sam Woodman <sam.woodman@noaa.gov>
Repository: CRAN
Date/Publication: 2021-01-07 20:20:02 UTC
Date/Publication: 2021-05-27 16:30:03 UTC
20 changes: 10 additions & 10 deletions MD5
@@ -1,6 +1,6 @@
5bad063914c5132f1d6e161bd83afbcb *DESCRIPTION
eb4ed274df35acbc8948620206989fce *DESCRIPTION
98d874b50afdb399ce610a208b8bd913 *NAMESPACE
8d3ced24336249d502ee326782c7412a *NEWS.md
085c72a4e1616a2c03552f0b96400169 *NEWS.md
d0438cf02728dbaa5cca59e2cba542b7 *R/as_das_df.R
1e4cba8a7d8da74119d7012247866623 *R/as_das_dfr.R
8c49db8da22cfadb3d8b5c72a3454bd3 *R/das_check.R
Expand All @@ -15,16 +15,16 @@ c418ed6b1524e453015f178111ee8a16 *R/das_effort_strata.R
83c136f1419aecf61d71369ebedb45dc *R/das_format_pdf.R
927f8611a6a67520107b7f0221d2652f *R/das_intersects_strata.R
53a7892bf2304782df111677270ddd10 *R/das_process.R
7f78742710a4a58a182fab1727d07fe9 *R/das_read.R
110a710d685ce71990a9f549fdeebf4c *R/das_read.R
37f5ff79244213e016b624e04090564a *R/das_segdata.R
0a0486f88d90a510fbd55b3c9d2e3a7e *R/das_sight.R
ce7d7c6cb53836f6b4b9b891b24747e4 *R/distance_greatcircle.R
d1632370a5a33bd5f35db26a0ce42da9 *R/randpicks_convert.R
35bc717b53c79426409d0bfb6dfd7c2d *R/subsetting.R
6c3088d16042b73f6c2a2ea1ea2f534d *R/subsetting.R
a13f59f7aab865b75d633d6969103c54 *R/swfscDAS-internal.R
e00740ec2f7519812d6c12a033ff0734 *R/swfscDAS-package.R
3e8d26cb101b356a6394cfa451432456 *README.md
b23cbfe6ef88b9694352235d813db721 *build/vignette.rds
35abc67baf9094dd0da3defc2d5a6072 *README.md
f2be43397c09f9311aca5b7821f611c1 *build/vignette.rds
dd00f8695b1893fbd071e5dfdda1fd21 *inst/DAS_Format.pdf
019d2c4a47e87035cddc8ec511bffee7 *inst/DAS_chop_equallength_figures.pdf
ad585d78881d3eb2512fadfd80370e11 *inst/Ship_sample.dat
Expand All @@ -34,10 +34,10 @@ e939bb5ad53390b97ba49994b3e2dda0 *inst/das_sample_randpicks.csv
18a11c4354a278365ad9e9861a9751e5 *inst/das_sample_stratum.csv
b5c224f276415b32bb94148851164805 *inst/doc/DAS_data_join.R
682b2d5c6fd4bed582338b2d254f0614 *inst/doc/DAS_data_join.Rmd
6b3fefb0ca8eedd9ee6f2b055bd4fd19 *inst/doc/DAS_data_join.html
b51f4ca95c7a17da9e10e3ced70c5bee *inst/doc/DAS_data_join.html
4f685d7405c1339bc4a53a4f7c38e32c *inst/doc/swfscDAS.R
f1b9f2e3a79cfd8327f0e6fb472de634 *inst/doc/swfscDAS.Rmd
e8c967c66bbc939064774addb056944b *inst/doc/swfscDAS.html
5c377b65971f659ee6e390ecd934eadb *inst/doc/swfscDAS.html
4a11a1d2152ecc536dd48eafe20c19e0 *man/as_das_df.Rd
e5eb676ff688f0f5713126383c21732f *man/as_das_dfr.Rd
30c513a87aaa131b4aca2f3fc59f8bf2 *man/das_check.Rd
Expand All @@ -53,12 +53,12 @@ bbf3f5cef99c801f77250cde4533ea20 *man/das_dfr-class.Rd
681d821b12b831e77e8ca808f5edeaa2 *man/das_format_pdf.Rd
2e752f1e800743472d92e85b6e40b5b0 *man/das_intersects_strata.Rd
198e4804ba648da6105e3900fcb2a9d9 *man/das_process.Rd
299065c1cecbc59da4e646faeaaa9d10 *man/das_read.Rd
7e4f09326143d569d8db540920697333 *man/das_read.Rd
745916a0954df731bfa4c1cc2b57933d *man/das_segdata.Rd
420c7747e7fab020b9e9474f9232ecda *man/das_sight.Rd
2195585b5d5bd793167e1ed18e6b434c *man/distance_greatcircle.Rd
430332a38d6bbc62e764363734dfe5eb *man/randpicks_convert.Rd
5c8378261b4e16f8773f8dde70c62968 *man/subsetting.Rd
352200b409c0d4798814a13d8296ad66 *man/subsetting.Rd
d7ed915019248e2a8c664299333faab1 *man/swfscAirDAS-internals.Rd
64b6930e10891cd0f5e37a4e12d9a63e *man/swfscDAS-package.Rd
eeb0bb4066fe9fe6a16be92222a219da *tests/testthat.R
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
@@ -1,3 +1,10 @@
# swfscDAS 0.5.1

* Link fixes - no functionality changes

* swfscDAS now depends on R >= 4.0.0 for consistency across package dependencies


# swfscDAS 0.5.0

* Added 'strata.files' argument to `das_effort` to allow users to split effort by strata
Expand Down
3 changes: 1 addition & 2 deletions R/das_read.R
Expand Up @@ -36,8 +36,7 @@
#' }
#'
#' See \code{\link{das_format_pdf}} for more information about DAS format requirements, and
#' note that 'Data#' columns may be referred to as 'Field#' columns in other documentation
#' This function was inspired by \code{\link[swfscMisc]{das.read}}
#' note that 'Data#' columns may be referred to as 'Field#' columns in other documentation.
#'
#' @return A \code{das_dfr} object, which is also a data frame, with DAS data read into columns.
#' The data are read into the data frame as characters as described in 'Details',
Expand Down
204 changes: 102 additions & 102 deletions R/subsetting.R
@@ -1,102 +1,102 @@
#' Subsetting objects created using swfscDAS
#'
#' Subsetting \code{das_dfr} or \code{das_df} objects
#'
#' @param x object of class \code{das_dfr} or \code{das_df}
#' @param i,j,... elements to extract or replace, see \link{[.data.frame}
#' @param drop logical, see \link{[.data.frame}
#' @param name A literal character string or ..., see \link{[.data.frame}
#' @param value A suitable replacement value, see \link{[.data.frame}
#'
#' @details
#' When subsetting a \code{das_dfr} or \code{das_df} object, henceforth a \code{das_} object,
#' using any of the functions described in \link{[.data.frame},
#' then then the \code{das_} class is simply dropped and the object is of class \code{data.frame}.
#' This is because of the strict format requirements of \code{das_} objects;
#' it is likely that a subsetted \code{das_} object will not have
#' the format required by subsequent swfscDAS functions,
#' and thus it is safest to drop the \code{das_} class.
#' If a data frame is passed to downstream \code{swfscDAS} functions that require a \code{das_} object,
#' then they will attempt to coerce the object to the necessary \code{das_} class
#' See \code{\link{as_das_dfr}} and \code{\link{as_das_df}} for more details.
#'
#' @name subsetting
#'
#' @examples
#' y <- system.file("das_sample.das", package = "swfscDAS")
#' y.read <- das_read(y)
#'
#' # All return a data frame:
#' class(y.read[1:10, ])
#' class(y.read[, 1:10])
#'
#' y.df <- y.read
#' y.df[, 1] <- "a"
#' class(y.df)
#'
#' y.df <- y.read
#' y.df$Event <- "a"
#' class(y.df)
#'
#' y.df <- y.read
#' y.df[["Event"]] <- "a"
#' class(y.df)


#' @rdname subsetting
#' @export
`[.das_dfr` <- function(x, i, j, ..., drop = TRUE) {
class(x) <- setdiff(class(x), "das_dfr")
NextMethod()
}

#' @rdname subsetting
#' @export
`$<-.das_dfr` <- function(x, name, value) {
class(x) <- setdiff(class(x), "das_dfr")
NextMethod()
}

#' @rdname subsetting
#' @export
`[<-.das_dfr` <- function(x, i, j, ..., value) {
class(x) <- setdiff(class(x), "das_dfr")
NextMethod()
}

#' @rdname subsetting
#' @export
`[[<-.das_dfr` <- function(x, i, value) {
class(x) <- setdiff(class(x), "das_dfr")
NextMethod()
}



#' @rdname subsetting
#' @export
`[.das_df` <- function(x, i, j, ..., drop = TRUE) {
class(x) <- setdiff(class(x), "das_df")
NextMethod()
}

#' @rdname subsetting
#' @export
`$<-.das_df` <- function(x, name, value) {
class(x) <- setdiff(class(x), "das_df")
NextMethod()
}

#' @rdname subsetting
#' @export
`[<-.das_df` <- function(x, i, j, ..., value) {
class(x) <- setdiff(class(x), "das_df")
NextMethod()
}

#' @rdname subsetting
#' @export
`[[<-.das_df` <- function(x, i, value) {
class(x) <- setdiff(class(x), "das_df")
NextMethod()
}
#' Subsetting objects created using swfscDAS
#'
#' Subsetting \code{das_dfr} or \code{das_df} objects
#'
#' @param x object of class \code{das_dfr} or \code{das_df}
#' @param i,j,... elements to extract or replace, see \code{\link[base]{[.data.frame}}
#' @param drop logical, see \code{\link[base]{[.data.frame}}
#' @param name A literal character string or ..., see \code{\link[base]{[.data.frame}}
#' @param value A suitable replacement value, see \code{\link[base]{[.data.frame}}
#'
#' @details
#' When subsetting a \code{das_dfr} or \code{das_df} object, henceforth a \code{das_} object,
#' using any of the functions described in \code{\link[base]{[.data.frame}},
#' then then the \code{das_} class is simply dropped and the object is of class \code{data.frame}.
#' This is because of the strict format requirements of \code{das_} objects;
#' it is likely that a subsetted \code{das_} object will not have
#' the format required by subsequent swfscDAS functions,
#' and thus it is safest to drop the \code{das_} class.
#' If a data frame is passed to downstream \code{swfscDAS} functions that require a \code{das_} object,
#' then they will attempt to coerce the object to the necessary \code{das_} class
#' See \code{\link{as_das_dfr}} and \code{\link{as_das_df}} for more details.
#'
#' @name subsetting
#'
#' @examples
#' y <- system.file("das_sample.das", package = "swfscDAS")
#' y.read <- das_read(y)
#'
#' # All return a data frame:
#' class(y.read[1:10, ])
#' class(y.read[, 1:10])
#'
#' y.df <- y.read
#' y.df[, 1] <- "a"
#' class(y.df)
#'
#' y.df <- y.read
#' y.df$Event <- "a"
#' class(y.df)
#'
#' y.df <- y.read
#' y.df[["Event"]] <- "a"
#' class(y.df)


#' @rdname subsetting
#' @export
`[.das_dfr` <- function(x, i, j, ..., drop = TRUE) {
class(x) <- setdiff(class(x), "das_dfr")
NextMethod()
}

#' @rdname subsetting
#' @export
`$<-.das_dfr` <- function(x, name, value) {
class(x) <- setdiff(class(x), "das_dfr")
NextMethod()
}

#' @rdname subsetting
#' @export
`[<-.das_dfr` <- function(x, i, j, ..., value) {
class(x) <- setdiff(class(x), "das_dfr")
NextMethod()
}

#' @rdname subsetting
#' @export
`[[<-.das_dfr` <- function(x, i, value) {
class(x) <- setdiff(class(x), "das_dfr")
NextMethod()
}



#' @rdname subsetting
#' @export
`[.das_df` <- function(x, i, j, ..., drop = TRUE) {
class(x) <- setdiff(class(x), "das_df")
NextMethod()
}

#' @rdname subsetting
#' @export
`$<-.das_df` <- function(x, name, value) {
class(x) <- setdiff(class(x), "das_df")
NextMethod()
}

#' @rdname subsetting
#' @export
`[<-.das_df` <- function(x, i, j, ..., value) {
class(x) <- setdiff(class(x), "das_df")
NextMethod()
}

#' @rdname subsetting
#' @export
`[[<-.das_df` <- function(x, i, value) {
class(x) <- setdiff(class(x), "das_df")
NextMethod()
}
26 changes: 21 additions & 5 deletions README.md
Expand Up @@ -7,9 +7,9 @@

[![CRAN
version](http://www.r-pkg.org/badges/version/swfscDAS)](https://cran.r-project.org/package=swfscDAS)
[![Travis build
status](https://travis-ci.com/smwoodman/swfscDAS.svg?branch=master)](https://travis-ci.com/smwoodman/swfscDAS)
<!-- [![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/smwoodman/swfscDAS?branch=master&svg=true)](https://ci.appveyor.com/project/smwoodman/swfscDAS) -->
[![R-CMD-check](https://github.com/smwoodman/swfscDAS/workflows/R-CMD-check/badge.svg)](https://github.com/smwoodman/swfscDAS/actions)
<!-- [![Travis build status](https://travis-ci.com/smwoodman/swfscDAS.svg?branch=master)](https://travis-ci.com/smwoodman/swfscDAS)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/smwoodman/swfscDAS?branch=master&svg=true)](https://ci.appveyor.com/project/smwoodman/swfscDAS) -->
<!-- badges: end -->

This package contains functions designed for processing and analyzing
Expand Down Expand Up @@ -40,8 +40,8 @@ remotes::install_github("smwoodman/swfscDAS")

Before installing swfscDAS, you must have
[R](https://www.r-project.org/),
[RStudio](https://rstudio.com/products/rstudio/download/#download), and
the appropriate version of
[RStudio](https://www.rstudio.com/products/rstudio/download/), and the
appropriate version of
[Rtools](https://cran.r-project.org/bin/windows/Rtools/) installed. When
installing the developmental version, it is best practice to install
after closing all instances of R and RStudio, and then running the
Expand All @@ -56,3 +56,19 @@ here](https://github.com/smwoodman/swfscDAS/blob/master/inst/DAS_Format.pdf)
describing the DAS data format requirements. See `das_format_pdf` for
instructions on how to access the local copy of the format PDF that is
included in the package.

## Disclaimer

This repository is a scientific product and is not official
communication of the National Oceanic and Atmospheric Administration, or
the United States Department of Commerce. All NOAA GitHub project code
is provided on an ‘as is’ basis and the user assumes responsibility for
its use. Any claims against the Department of Commerce or Department of
Commerce bureaus stemming from the use of this GitHub project will be
governed by all applicable Federal law. Any reference to specific
commercial products, processes, or services by service mark, trademark,
manufacturer, or otherwise, does not constitute or imply their
endorsement, recommendation or favoring by the Department of Commerce.
The Department of Commerce seal and logo, or the seal and logo of a DOC
bureau, shall not be used in any manner to imply endorsement of any
commercial product or activity by DOC or the United States Government.
Binary file modified build/vignette.rds
Binary file not shown.

0 comments on commit fead271

Please sign in to comment.