From 29f9599f90977b7f8052aaf751ebb57cbd729017 Mon Sep 17 00:00:00 2001
From: pqiao29 <pqiao@student.unimelb.edu.au>
Date: Wed, 8 Apr 2020 17:04:10 +1000
Subject: [PATCH] clear function names: icm.seiqhrf -> seiqhrf

---
 NAMESPACE                                | 2 +-
 R/{crosscheck.seiqhrf.R => crosscheck.R} | 0
 R/{icm_seiqhrf.R => seiqhrf.R}           | 2 +-
 R/simulation.R                           | 2 +-
 man/crosscheck.seiqhrf.icm.Rd            | 2 +-
 man/{icm.seiqhrf.Rd => seiqhrf.Rd}       | 6 +++---
 tests/testthat/test-icm-seiqhrf.R        | 4 ++--
 7 files changed, 9 insertions(+), 9 deletions(-)
 rename R/{crosscheck.seiqhrf.R => crosscheck.R} (100%)
 rename R/{icm_seiqhrf.R => seiqhrf.R} (99%)
 rename man/{icm.seiqhrf.Rd => seiqhrf.Rd} (82%)

diff --git a/NAMESPACE b/NAMESPACE
index 3bff906..86c4049 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -7,7 +7,6 @@ export(cum_discr_si)
 export(departures.FUN)
 export(get_prev.FUN)
 export(get_times)
-export(icm.seiqhrf)
 export(infection.FUN)
 export(init_status.icm)
 export(initialize.FUN)
@@ -15,6 +14,7 @@ export(plot_models)
 export(plot_times)
 export(recovery.FUN)
 export(saveout.seiqhrf.icm)
+export(seiqhrf)
 export(simulate_seiqhrf)
 export(summary_seiqhrf)
 export(vary_param)
diff --git a/R/crosscheck.seiqhrf.R b/R/crosscheck.R
similarity index 100%
rename from R/crosscheck.seiqhrf.R
rename to R/crosscheck.R
diff --git a/R/icm_seiqhrf.R b/R/seiqhrf.R
similarity index 99%
rename from R/icm_seiqhrf.R
rename to R/seiqhrf.R
index 3ffbe83..e5b6798 100644
--- a/R/icm_seiqhrf.R
+++ b/R/seiqhrf.R
@@ -69,7 +69,7 @@ merge.seiqhrf.icm <- function(x, y, ...) {
 #' @importFrom EpiModel verbose.icm
 #' @importFrom future availableCores
 #' @export
-icm.seiqhrf <- function(param, init, control, seed = NULL) {
+seiqhrf <- function(param, init, control, seed = NULL) {
 
 
   crosscheck.seiqhrf.icm(param, init, control)
diff --git a/R/simulation.R b/R/simulation.R
index f079ac5..d8cb204 100644
--- a/R/simulation.R
+++ b/R/simulation.R
@@ -345,7 +345,7 @@ simulate_seiqhrf <- function(type = "SEIQHRF",
                         dh.rate = dh.rate,
                         dr.rate = dr.rate)
 
-    sim <- icm.seiqhrf(param, init, control)
+    sim <- seiqhrf(param, init, control)
     sim_df <- as.data.frame(sim, out=out)
 
     return(list(sim=sim, df=sim_df))
diff --git a/man/crosscheck.seiqhrf.icm.Rd b/man/crosscheck.seiqhrf.icm.Rd
index 8490774..90a5149 100644
--- a/man/crosscheck.seiqhrf.icm.Rd
+++ b/man/crosscheck.seiqhrf.icm.Rd
@@ -1,5 +1,5 @@
 % Generated by roxygen2: do not edit by hand
-% Please edit documentation in R/crosscheck.seiqhrf.R
+% Please edit documentation in R/crosscheck.R
 \name{crosscheck.seiqhrf.icm}
 \alias{crosscheck.seiqhrf.icm}
 \title{Cross Checking of Inputs for Stochastic Individual Contact Models}
diff --git a/man/icm.seiqhrf.Rd b/man/seiqhrf.Rd
similarity index 82%
rename from man/icm.seiqhrf.Rd
rename to man/seiqhrf.Rd
index 0569a61..dd902c4 100644
--- a/man/icm.seiqhrf.Rd
+++ b/man/seiqhrf.Rd
@@ -1,10 +1,10 @@
 % Generated by roxygen2: do not edit by hand
 % Please edit documentation in R/icm_seiqhrf.R
-\name{icm.seiqhrf}
-\alias{icm.seiqhrf}
+\name{seiqhrf}
+\alias{seiqhrf}
 \title{SEIQHRF function}
 \usage{
-icm.seiqhrf(param, init, control, seed = NULL)
+seiqhrf(param, init, control, seed = NULL)
 }
 \arguments{
 \item{param}{ICM parameters.}
diff --git a/tests/testthat/test-icm-seiqhrf.R b/tests/testthat/test-icm-seiqhrf.R
index e9edfd6..6a69133 100644
--- a/tests/testthat/test-icm-seiqhrf.R
+++ b/tests/testthat/test-icm-seiqhrf.R
@@ -19,8 +19,8 @@ test_that("Identical output as Churches' original function: icm_seiqhrf", {
     comp <- rep(NA, No_seeds)
     i <- 1
     for(seed in seed_list){
-        sim1 <- icm.seiqhrf(param, init, control1, seed)
-        sim2 <- icm.seiqhrf(param, init, control2, seed)
+        sim1 <- seiqhrf(param, init, control1, seed)
+        sim2 <- seiqhrf(param, init, control2, seed)
         comp[i] <- identical(sim1, sim2)
         i <- i + 1
     }
-- 
GitLab