Skip to content

Commit

Permalink
Merge pull request #99 from habitus-eu/issue98_deprecatePALMSpy
Browse files Browse the repository at this point in the history
Deprecate PALMSpy and Countconverter
  • Loading branch information
vincentvanhees authored Jan 22, 2024
2 parents ed15b66 + 90aa0df commit 9b22224
Show file tree
Hide file tree
Showing 19 changed files with 85 additions and 3,674 deletions.
3 changes: 0 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Generated by roxygen2: do not edit by hand

export(Counts2csv)
export(GGIRshiny)
export(PALMSpyshiny)
export(checkConfigFile)
export(check_params)
export(cleanPath)
Expand All @@ -26,7 +24,6 @@ importFrom(jsonlite,toJSON)
importFrom(magrittr,"%>%")
importFrom(methods,new)
importFrom(methods,setClass)
importFrom(stats,aggregate)
importFrom(stats,rnorm)
importFrom(stats,runif)
importFrom(utils,read.csv)
Expand Down
95 changes: 0 additions & 95 deletions R/Counts2csv.R

This file was deleted.

1 change: 1 addition & 0 deletions R/GGIRshiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' @param do.Counts Boolean to indicate whether BrondCounts should be derived
#' @return no object is returned, only a new file is created in the output directory
#' @import GGIR
#' @importFrom utils write.table
#' @export

GGIRshiny = function(rawaccdir, outputdir, sleepdiary = c(), configfile = c(),
Expand Down
28 changes: 0 additions & 28 deletions R/PALMSpyshiny.R

This file was deleted.

1 change: 1 addition & 0 deletions R/hbGPS_shiny.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' @param configfile Path to configuration file
#' @return no object is returned, only a new file is created in the output directory
#' @import hbGPS
#' @importFrom utils write.table
#' @export

hbGPS_shiny = function(ggiroutdir = NULL, gpsdir = NULL, outputdir = NULL,
Expand Down
33 changes: 5 additions & 28 deletions R/identify_tools.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,18 @@
# S4 class needs to be defined outside function
setClass(Class = "toolio", slots = list(input = "character", output = "character", usecases = "character"))

identify_tools = function(datatypes = c("AccRaw", "ACount", "GPS", "GIS",
"PALMSpy_out", "GGIR_out", "hbGPS_out"),
identify_tools = function(datatypes = c("AccRaw", "GPS", "GIS",
"GGIR_out", "hbGPS_out"),
goals = c("PA", "QC", "Trips", "Environment"),
available_tools = c("GGIR", "PALMSpy", "hbGIS", "CountConverter", "hbGPS")) {
available_tools = c("GGIR", "hbGIS", "hbGPS")) {
iotools = list(GGIR = new("toolio",
input = "AccRaw",
output = c("GGIR_out", "ACount"),
output = "GGIR_out",
usecases = c("PA", "QC", "Trips", "Environment")),
PALMSpy = new("toolio",
input = c("ACount", "GPS"),
output = c("PALMSpy_out"),
usecases = c("Trips", "QC", "Environment")),
hbGIS = new("toolio", # hbGIS based on PALMSpy output
input = c("PALMSpy_out", "GIS"),
output = c("hbGIS_out"),
usecases = c("Environment", "QC")),
hbGIS = new("toolio", # hbGIS based on hbGPS output
hbGIS = new("toolio",
input = c("hbGPS_out", "GIS"),
output = c("hbGIS_out"),
usecases = c("Environment", "QC")),
CountConverter = new("toolio",
input = "AccRaw",
output = c("Counts_out"),
usecases = c("PA", "Trips", "QC", "Environment")),
hbGPS = new("toolio",
input = c("GGIR_out","GPS"),
output = c("hbGPS_out"),
Expand All @@ -55,16 +43,5 @@ identify_tools = function(datatypes = c("AccRaw", "ACount", "GPS", "GIS",
if ("AccRaw" %in% datatypes == FALSE & "GGIR" %in% tools_needed) {
tools_needed = tools_needed[-which(tools_needed == "GGIR")]
}
if ("CountConverter" %in% tools_needed) {
if ("ACount" %in% datatypes == TRUE | # No need to estimate counts if they already exist
("AccRaw" %in% datatypes == TRUE & "GPS" %in% datatypes == FALSE)) { # No need to estimate counts if there is no GPS data
tools_needed = tools_needed[-which(tools_needed == "CountConverter")]
}
}
# Mask tools that will be deprecated
if (any(c("CountConverter", "PALMSpy") %in% tools_needed == TRUE)) {
tools_needed = tools_needed[-which(tools_needed %in% c("CountConverter", "PALMSpy"))]
}

invisible(list(tools_needed = tools_needed, iotools = iotools[which(names(iotools) %in% tools_needed)]))
}
Loading

0 comments on commit 9b22224

Please sign in to comment.