Skip to content

Commit

Permalink
Merge pull request #414 from StoXProject/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
arnejohannesholmin authored Jan 21, 2025
2 parents ce33d90 + cce0dcf commit 3bcf11e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 10 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: RstoxData
Version: 2.1.2-9001
Date: 2025-01-15
Version: 2.1.2
Date: 2025-01-20
Title: Tools to Read and Manipulate Fisheries Data
Authors@R: c(
person(given = "Edvin",
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# RstoxData v2.1.2 (2025-01-20)
* Final release for StoX 4.1.2.


# RstoxData v2.1.2-9001 (2025-01-14)
* Improved warning when multiple serial numbers have the same station in NMDBiotic input files.

Expand Down
23 changes: 15 additions & 8 deletions R/stoxFunctionAttributes.R
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Function to get variable names, given a different variable name in the input VariableName. This funciton is used e.g. to list possible ConditionalVariableNames:
getVariableNamesStoxData <- function(BioticData, StoxBioticData, ICESBioticData, ICESDatrasData, ICESDatsuscData, AcousticData, StoxAcousticData, ICESAcousticData, LandingData, StoxLandingData, VariableName) {

# Function to get the names of a table if that table contains certain variables:
Expand Down Expand Up @@ -55,6 +56,17 @@ getVariableNamesStoxData <- function(BioticData, StoxBioticData, ICESBioticData,
}


# Function to get variable names from all tables:
getVariableNameStoxData <- function(BioticData, StoxBioticData, ICESBioticData, ICESDatrasData, ICESDatsuscData, AcousticData, StoxAcousticData, ICESAcousticData, LandingData, StoxLandingData) {

output <- getVariableNamesStoxData(BioticData, StoxBioticData, ICESBioticData, ICESDatrasData, ICESDatsuscData, AcousticData, StoxAcousticData, ICESAcousticData, LandingData, StoxLandingData, VariableName = NULL)

return(output)
}




getValueColumns <- function(FileName, ValueColumn = NULL, NewValueColumn = NULL, ConditionalValueColumns = NULL) {
# Read the table from file:
tanslation <- data.table::fread(FileName, encoding = "UTF-8", colClasses = "character")
Expand Down Expand Up @@ -1140,7 +1152,7 @@ processPropertyFormats <- list(
variableName_translate = list(
class = "single",
title = "Select one variable to translate.",
possibleValues = getVariableNamesStoxData,
possibleValues = getVariableNameStoxData,
variableTypes = "character"
),
valueColumn = list(
Expand Down Expand Up @@ -1182,15 +1194,10 @@ processPropertyFormats <- list(
fromVariable_StoxData = list(
class = "single",
title = "Select one variable to copy",
possibleValues = getVariableNamesStoxData,
possibleValues = getVariableNameStoxData,
variableTypes = "character"
),
#conditionalVariableNames_Copy = list(
# class = "vector",
# title = "Select one variable to copy",
# possibleValues = getVariableNamesStoxData,
# variableTypes = "character"
#),


roundingTable = list(
class = "table",
Expand Down

0 comments on commit 3bcf11e

Please sign in to comment.