Skip to content

Commit

Permalink
Merge pull request #405 from StoXProject/testing
Browse files Browse the repository at this point in the history
Testing
  • Loading branch information
arnejohannesholmin authored Nov 6, 2024
2 parents 5b1591a + 7d0f2c4 commit fa4dd8e
Show file tree
Hide file tree
Showing 15 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: RstoxData
Version: 2.1.0
Date: 2024-11-04
Date: 2024-11-06
Title: Tools to Read and Manipulate Fisheries Data
Authors@R: c(
person(given = "Edvin",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# RstoxData v2.1.0 (2024-11-04)
* Final release for StoX 4.1.0.
* Fixed bug in DefineTranslation, where the ConditionalVariableNames was showing as a single string and not a vector.


# RstoxData v2.0.1-9006 (2024-10-30)
Expand Down
20 changes: 10 additions & 10 deletions R/Filter.R
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ expandFilterExpressionList <- function(FilterExpressionList, sep = "/") {
#' Filters \code{\link{BioticData}}.
#'
#' @param BioticData Input \code{\link{BioticData}} data.
#' @param FilterExpression Filter expression given as a list of strings. The name of the list and structures should be identical to the names of the input data list. To extract or exclude missing values (NAs) use the operator \code{\%in\%} or the special operator \code{\%notin\%}, which is defined in RstoxData. For a numeric filter, in the current StoX GUI, NA must be added manually in the text field of the "Expression table dialog" (the "Query builder dialog" will only show numeric values and will show an empty fields if the filter contains NA).
#' @param FilterExpression Filter expression given as a list of strings. The name of the list and structures should be identical to the names of the input data list. To extract or exclude missing values (NAs) use the operator \code{\%in\%} or the special operator \code{\%notin\%}, which is defined in RstoxData. For a numeric filter, in the current StoX GUI, NA must be added manually in the text field of the "Expression table dialog" (the "Query builder dialog" will only show numeric values and will show an empty fields if the filter contains NA). Possible values are provided in the filter expression builder in the StoX GUI for character values, integer values, and numeric values that are all whole numbers, but not for keys (CruiseKey, StationKey, HaulKey, SpeciesCategoryKey, SampleKey and IndividualKey in \code{\link{FilterStoxBiotic}}, and CruiseKey, LogKey, BeamKey, AcousticCategoryKey, ChannelReferenceKey and NASCKey in \code{\link{FilterStoxAcoustic}}).
#' @param FilterUpwards Whether the filter action will propagate in the upwards direction. Default to FALSE. Use this option with caution, particularly for swept-area survey estimates, where setting \code{FilterUpwards} to TRUE could affect the estimated mean density.
#'
#' @return An object of filtered data in the same format as the input data.
Expand All @@ -489,8 +489,8 @@ FilterBiotic <- function(BioticData, FilterExpression = list(), FilterUpwards =
#'
#' Filters \code{\link{AcousticData}}.
#'
#' @inheritParams FilterBiotic
#' @param AcousticData Input \code{\link{AcousticData}} data.
#' @param FilterExpression Filter expression in list of strings. The name of the list and structures should be identical to the names of the input data list.
#' @param FilterUpwards Whether the filter action will propagate in the upwards direction. Default to FALSE.
#'
#' @return An object of filtered data in the same format as the input data.
Expand All @@ -516,8 +516,8 @@ FilterAcoustic <- function(AcousticData, FilterExpression = list(), FilterUpward
#'
#' Filters \code{\link{LandingData}}.
#'
#' @inheritParams FilterBiotic
#' @param LandingData Input \code{\link{LandingData}} data.
#' @param FilterExpression Filter expression in list of strings. The name of the list and structures should be identical to the names of the input data list.
#' @param FilterUpwards Whether the filter action will propagate in the upwards direction. Default to FALSE.
#'
#' @return An object of filtered data in the same format as the input data.
Expand All @@ -541,8 +541,8 @@ FilterLanding <- function(LandingData, FilterExpression = list(), FilterUpwards
#'
#' Filters \code{\link{StoxBioticData}}.
#'
#' @inheritParams FilterBiotic
#' @param StoxBioticData Input \code{\link{StoxBioticData}} data.
#' @param FilterExpression Filter expression in list of strings. The name of the list and structures should be identical to the names of the input data list.
#' @param FilterUpwards Whether the filter action will propagate in the upwards direction. Default to FALSE.
#'
#' @return An object of filtered data in the same format as the input data.
Expand Down Expand Up @@ -590,8 +590,8 @@ getFilterStoxBiotic_FilterExpressionWarningMessage <- function(FilterExpression,
#'
#' Filters \code{\link{StoxAcousticData}}.
#'
#' @inheritParams FilterBiotic
#' @param StoxAcousticData Input \code{\link{StoxAcousticData}} data.
#' @param FilterExpression Filter expression in list of strings. The name of the list and structures should be identical to the names of the input data list.
#' @param FilterUpwards Whether the filter action will propagate in the upwards direction. Default to FALSE.
#'
#' @return An object of filtered data in the same format as the input data.
Expand All @@ -611,8 +611,8 @@ FilterStoxAcoustic <- function(StoxAcousticData, FilterExpression = list(), Filt
#'
#' Filters \code{\link{StoxLandingData}}.
#'
#' @inheritParams FilterBiotic
#' @param StoxLandingData Input \code{\link{StoxLandingData}} data.
#' @param FilterExpression Filter expression in list of strings. The name of the list and structures should be identical to the names of the input data list.
#'
#' @return An object of filtered data in the same format as the input data.
#'
Expand All @@ -635,8 +635,8 @@ FilterStoxLanding <- function(StoxLandingData, FilterExpression = list()) {
#'
#' Filters \code{\link{ICESBioticData}}.
#'
#' @inheritParams FilterBiotic
#' @param ICESBioticData Input \code{\link{ICESBioticData}} data.
#' @param FilterExpression Filter expression in list of strings. The name of the list and structures should be identical to the names of the input data list.
#' @param FilterUpwards Whether the filter action will propagate in the upwards direction. Default to FALSE.
#'
#' @return An object of filtered data in the same format as the input data.
Expand All @@ -659,8 +659,8 @@ FilterICESBiotic <- function(ICESBioticData, FilterExpression = list(), FilterUp
#'
#' Filters \code{\link{ICESAcousticData}}.
#'
#' @inheritParams FilterBiotic
#' @param ICESAcousticData Input \code{\link{ICESAcousticData}} data.
#' @param FilterExpression Filter expression in list of strings. The name of the list and structures should be identical to the names of the input data list.
#' @param FilterUpwards Whether the filter action will propagate in the upwards direction. Default to FALSE.
#'
#' @return An object of filtered data in the same format as the input data.
Expand All @@ -683,8 +683,8 @@ FilterICESAcoustic <- function(ICESAcousticData, FilterExpression = list(), Filt
#'
#' Filters \code{\link{ICESDatrasData}}.
#'
#' @inheritParams FilterBiotic
#' @param ICESDatrasData Input \code{\link{ICESDatrasData}} data.
#' @param FilterExpression Filter expression in list of strings. The name of the list and structures should be identical to the names of the input data list.
#'
#' @return An object of filtered data in the same format as the input data.
#'
Expand All @@ -708,8 +708,8 @@ FilterICESDatras <- function(ICESDatrasData, FilterExpression = list()) {
#'
#' Filters \code{\link{ICESDatsuscData}}.
#'
#' @inheritParams FilterBiotic
#' @param ICESDatsuscData Input \code{\link{ICESDatsuscData}} data.
#' @param FilterExpression Filter expression in list of strings. The name of the list and structures should be identical to the names of the input data list.
#'
#' @return An object of filtered data in the same format as the input data.
#'
Expand Down
7 changes: 4 additions & 3 deletions R/stoxFunctionAttributes.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,9 @@ getVariableNamesStoxData <- function(BioticData, StoxBioticData, ICESBioticData,
else if(!missing(StoxLandingData)) {
output <- lapply(StoxLandingData, getNamesIfVariableIsPresent, requiredVariableNames = VariableName)
}

else {
return(NULL)
}

output <- sort(unique(unlist(output)))
output <- setdiff(output, VariableName)
Expand Down Expand Up @@ -471,8 +473,7 @@ stoxFunctionAttributes <- list(
functionParameterFormat = list(
TranslationTable = "translationTable",
FileName = "filePath",
# No format for ConditionalVariableNames, since we do not have any function input in DefineTranslation:
#ConditionalVariableNames = "conditionalVariableNames_translate",
ConditionalVariableNames = "conditionalVariableNames_translate",
ValueColumn = "valueColumn",
NewValueColumn = "newValueColumn",
ConditionalValueColumns = "conditionalValueColumns"
Expand Down
Binary file modified inst/extdata/functionArguments.rds
Binary file not shown.
2 changes: 1 addition & 1 deletion man/FilterAcoustic.Rd

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

2 changes: 1 addition & 1 deletion man/FilterBiotic.Rd

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

2 changes: 1 addition & 1 deletion man/FilterICESAcoustic.Rd

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

2 changes: 1 addition & 1 deletion man/FilterICESBiotic.Rd

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

2 changes: 1 addition & 1 deletion man/FilterICESDatras.Rd

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

2 changes: 1 addition & 1 deletion man/FilterICESDatsusc.Rd

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

2 changes: 1 addition & 1 deletion man/FilterLanding.Rd

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

2 changes: 1 addition & 1 deletion man/FilterStoxAcoustic.Rd

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

Loading

0 comments on commit fa4dd8e

Please sign in to comment.