From 9b7c9ac05ea405c30e2886ace5711fefcf396aaf Mon Sep 17 00:00:00 2001 From: ntorresd Date: Wed, 8 May 2024 12:09:41 -0500 Subject: [PATCH] remove `simdata_*` datasets from the package (no longer needed) --- R/simdata_constant.R | 18 ------------ R/simdata_large_epi.R | 18 ------------ R/simdata_sw_dec.R | 18 ------------ data/simdata_constant.RData | Bin 322 -> 0 bytes data/simdata_large_epi.RData | Bin 317 -> 0 bytes data/simdata_sw_dec.RData | Bin 317 -> 0 bytes man/simdata_constant.Rd | 22 -------------- man/simdata_large_epi.Rd | 22 -------------- man/simdata_sw_dec.Rd | 22 -------------- tests/testthat/models_serialization.R | 40 -------------------------- 10 files changed, 160 deletions(-) delete mode 100644 R/simdata_constant.R delete mode 100644 R/simdata_large_epi.R delete mode 100644 R/simdata_sw_dec.R delete mode 100644 data/simdata_constant.RData delete mode 100644 data/simdata_large_epi.RData delete mode 100644 data/simdata_sw_dec.RData delete mode 100644 man/simdata_constant.Rd delete mode 100644 man/simdata_large_epi.Rd delete mode 100644 man/simdata_sw_dec.Rd delete mode 100644 tests/testthat/models_serialization.R diff --git a/R/simdata_constant.R b/R/simdata_constant.R deleted file mode 100644 index f86b6cdf..00000000 --- a/R/simdata_constant.R +++ /dev/null @@ -1,18 +0,0 @@ -#' Constant force-of-infection simulated serosurvey -#' -#' Simulated dataset describing a endemic situation where the force-of-infection -#' is constant over a period of 50 years (2000-2050) with a value of 0.2. -#' The hypothetical serosurvey is conducted in year 2050 for 250 individuals -#' that are up to 50 years old. -#' -#' @docType data -#' -#' @usage simdata_constant -#' -#' @format An object of class `"cross"`; see [qtl::read.cross()]. -#' -#' @keywords datasets -#' -#' @examples -#' simdata_constant -"simdata_constant" diff --git a/R/simdata_large_epi.R b/R/simdata_large_epi.R deleted file mode 100644 index b057f737..00000000 --- a/R/simdata_large_epi.R +++ /dev/null @@ -1,18 +0,0 @@ -#' Large epidemic simulated serosurvey -#' -#' Simulated dataset describing a large epidemic between the years 2032 and 2035 -#' with a constant force-of-infection with value 1.5. -#' The hypothetical serosurvey is conducted in year 2050 for 250 individuals -#' that are up to 50 years old. -#' -#' @docType data -#' -#' @usage simdata_large_epi -#' -#' @format An object of class `"cross"`; see [qtl::read.cross()]. -#' -#' @keywords datasets -#' -#' @examples -#' simdata_large_epi -"simdata_large_epi" diff --git a/R/simdata_sw_dec.R b/R/simdata_sw_dec.R deleted file mode 100644 index 809496f4..00000000 --- a/R/simdata_sw_dec.R +++ /dev/null @@ -1,18 +0,0 @@ -#' Step-wise decreasing force-of-infection simulated serosurvey -#' -#' Simulated dataset describing a situation where the force-of-infection -#' follows a step-wise decreasing tendency over a period of 50 years (2000-2050) -#' The hypothetical serosurvey is conducted in year 2050 for 250 individuals -#' that are up to 50 years old. -#' -#' @docType data -#' -#' @usage simdata_sw_dec -#' -#' @format An object of class `"cross"`; see [qtl::read.cross()]. -#' -#' @keywords datasets -#' -#' @examples -#' simdata_sw_dec -"simdata_sw_dec" diff --git a/data/simdata_constant.RData b/data/simdata_constant.RData deleted file mode 100644 index 62df2d5dd0a85e51ab437222026ca2cab94ddc71..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 322 zcmV-I0loeoiwFP!000000}FDAFy@NjVqjokW?*4rW?*IoG8tGyL)>&N7=R)`4kH5# z11FFcD9+4HNi0c>PtMOPE=kNQ0qPM3ii72Vm=cRAQptX1FFG621;u{X+tP&2Boc`G*p9wQv-x{h4S4S zVD6x;xeHhz;#8s;P}3ocUw&RHUD>Gia{|*#X-;BEYRcdhKy@**XSzE*n5g9nYhGe* zYBAI)oKQiw;?knB)Jm9=lKhgy9GFyceraAwF_g!in4TJ+o0*5gO{{>$O9{{%m=suF zQ6*d|wHTJQIe@u2Gbul%65VOZIf=zEr@;idK!t!_S`pCIXv#T@^2_yLz5!)nCQyR^ U|Ns9tAoUM~0hn6qV{Zij05AoI-v9sr diff --git a/data/simdata_large_epi.RData b/data/simdata_large_epi.RData deleted file mode 100644 index 3617b6cadf9b76069f882a9696959e27a4ac42dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmV-D0mA+tiwFP!000000}FDAFy@NjVqjokW?*4rW?*IoG8tGyL)>&N7=R)`4kH5# z11FFcEY8eLNi0c>&q*vwPmND4$OLK<21#2_ zfB{}`$f5#Js7pez1QdhVvT%1m6*|a3X$>fC2&K)Sv^A85YH)CBfY7c`zIy}APTHEg zfCVB>C7J;>MY8zi=cUq>jcPw9Fu|1OB$lM63|;|L7c+aNyVHY-TEwvCCFZ6UL!H72 z6=W+eEhFG*hr&&)fW=D*&>WZ)SYJ^kTq?D= z1j^<}%qz)E%1^08cUp2zVlm8VFhMR*DWI2D1avi;a?Yasay^)DKv|dxl;HpW|Njk0 P{R3eD7M!h?dIbOg$4!E0 diff --git a/data/simdata_sw_dec.RData b/data/simdata_sw_dec.RData deleted file mode 100644 index e6d8be6ead55f92a2ceb7928f72bbf42fce51e42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 317 zcmV-D0mA+tiwFP!000000}FDAFy@NjVqjokW?*4rW?*IoG8tGyL)>&N7=R)`4kH5# z11FH?E6&VKNi0c>FD{QyNlgao5C)2ZWCVbi3x}%VAqo@$`O(3I0Sp{0DWvTfV1O4K zcBp_Ih`E7S1c=3AbbdZ748c^C0N}EAxYbXuX;Na8%pno~+OQjZ< zK-nCLc_o=i`6-p?PD{>7EQUD^CddUU0`$^~fUZVU&RLXSt_SlCC<`-z68!)F|GxpL Pe;^D1plbjKSp@(9zOH@R diff --git a/man/simdata_constant.Rd b/man/simdata_constant.Rd deleted file mode 100644 index e06f96e7..00000000 --- a/man/simdata_constant.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/simdata_constant.R -\docType{data} -\name{simdata_constant} -\alias{simdata_constant} -\title{Constant force-of-infection simulated serosurvey} -\format{ -An object of class \code{"cross"}; see \code{\link[qtl:read.cross]{qtl::read.cross()}}. -} -\usage{ -simdata_constant -} -\description{ -Simulated dataset describing a endemic situation where the force-of-infection -is constant over a period of 50 years (2000-2050) with a value of 0.2. -The hypothetical serosurvey is conducted in year 2050 for 250 individuals -that are up to 50 years old. -} -\examples{ -simdata_constant -} -\keyword{datasets} diff --git a/man/simdata_large_epi.Rd b/man/simdata_large_epi.Rd deleted file mode 100644 index 7f0ba780..00000000 --- a/man/simdata_large_epi.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/simdata_large_epi.R -\docType{data} -\name{simdata_large_epi} -\alias{simdata_large_epi} -\title{Large epidemic simulated serosurvey} -\format{ -An object of class \code{"cross"}; see \code{\link[qtl:read.cross]{qtl::read.cross()}}. -} -\usage{ -simdata_large_epi -} -\description{ -Simulated dataset describing a large epidemic between the years 2032 and 2035 -with a constant force-of-infection with value 1.5. -The hypothetical serosurvey is conducted in year 2050 for 250 individuals -that are up to 50 years old. -} -\examples{ -simdata_large_epi -} -\keyword{datasets} diff --git a/man/simdata_sw_dec.Rd b/man/simdata_sw_dec.Rd deleted file mode 100644 index 406cffc7..00000000 --- a/man/simdata_sw_dec.Rd +++ /dev/null @@ -1,22 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/simdata_sw_dec.R -\docType{data} -\name{simdata_sw_dec} -\alias{simdata_sw_dec} -\title{Step-wise decreasing force-of-infection simulated serosurvey} -\format{ -An object of class \code{"cross"}; see \code{\link[qtl:read.cross]{qtl::read.cross()}}. -} -\usage{ -simdata_sw_dec -} -\description{ -Simulated dataset describing a situation where the force-of-infection -follows a step-wise decreasing tendency over a period of 50 years (2000-2050) -The hypothetical serosurvey is conducted in year 2050 for 250 individuals -that are up to 50 years old. -} -\examples{ -simdata_sw_dec -} -\keyword{datasets} diff --git a/tests/testthat/models_serialization.R b/tests/testthat/models_serialization.R deleted file mode 100644 index 3926c1ff..00000000 --- a/tests/testthat/models_serialization.R +++ /dev/null @@ -1,40 +0,0 @@ -library(serofoi) -library(testthat) - -set.seed(1234) # For reproducibility - -#----- Read and prepare data -data("simdata_large_epi") -simdata <- prepare_serodata(simdata_large_epi) -no_transm <- 0.0000000001 -big_outbreak <- 1.5 -foi_sim <- c(rep(no_transm, 32), rep(big_outbreak, 3), rep(no_transm, 15)) # 1 epidemics - - -#----- Run models -models_to_run <- c( - "constant", - "tv_normal", - "tv_normal_log" -) - -models_list <- lapply(models_to_run, - run_seromodel, - serodata = simdata, - iter = 1000 -) - -saveRDS( - models_list[[1]], - testthat::test_path("extdata", "model_constant.RDS") -) - -saveRDS( - models_list[[2]], - testthat::test_path("extdata", "model_tv_normal.RDS") -) - -saveRDS( - models_list[[3]], - testthat::test_path("extdata", "model_tv_normal_log.RDS") -)