Skip to content

Commit

Permalink
Cleaned up devtools::check() problems and bumped version
Browse files Browse the repository at this point in the history
Version to 0.2.0
Updated DESCRIPTION Imports and Suggests
Tweaked documentation
Updated @ImportFrom
Added @ImportMethodsFrom bbmle summary
Roxygenised
Refreshed reference manual PDF
  • Loading branch information
mbg-unsw committed Jun 28, 2024
1 parent db2f5de commit 3323c48
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 23 deletions.
11 changes: 4 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: Rwtdttt
Title: Parametric Waiting Time Distribution estimation
Version: 0.1.0
Version: 0.2.0
Author: Sabrina Giometto, Malcolm Gillies, Olga Paoletti, Henrik Støvring
Maintainer: Henrik Støvring <[email protected]>
Description: Estimation of prescription durations and treatment
Expand All @@ -15,17 +15,14 @@ License: GPL (>= 3)
Roxygen: list(markdown = TRUE)
Imports:
bbmle,
class,
data.table (>= 1.15.0),
dplyr,
haven,
methods,
graphics,
rlang,
stats,
numDeriv
stats
Suggests:
testthat (>= 3.0.0)
testthat (>= 3.0.0),
haven
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Expand Down
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ importFrom(graphics,curve)
importFrom(graphics,hist)
importFrom(methods,as)
importFrom(methods,is)
importFrom(numDeriv,grad)
importFrom(rlang,enquo)
importFrom(rlang,eval_tidy)
importFrom(stats,as.formula)
importFrom(stats,formula)
importFrom(stats,model.frame)
importFrom(stats,model.matrix)
importFrom(stats,na.pass)
importFrom(stats,numericDeriv)
importFrom(stats,pexp)
importFrom(stats,pnorm)
importFrom(stats,pweibull)
Expand All @@ -38,3 +38,4 @@ importFrom(stats,qnorm)
importFrom(stats,runif)
importFrom(stats,sd)
importFrom(stats,terms)
importMethodsFrom(bbmle,summary)
14 changes: 3 additions & 11 deletions R/dfunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,9 @@
#' @param delta width of interval with positive support (x in (0; delta))
#' @param log logical; if TRUE, density values are returned on log-scale.
#'
#' @return
#' @return Density. The length of the result is the maximum of the lengths of the numerical arguments.
#' @export
#' @importFrom stats pnorm
#'
#' @examples
#'
#'

dlnorm <- function(x, logitp, mu, lnsigma, delta = 1, log = FALSE) {

Expand Down Expand Up @@ -44,10 +40,8 @@ dlnorm <- function(x, logitp, mu, lnsigma, delta = 1, log = FALSE) {
#' @param delta width of interval with positive support (x in (0; delta))
#' @param log logical; if TRUE, probabilities p are given as log(p)
#'
#' @return
#' @return Density. The length of the result is the maximum of the lengths of the numerical arguments.
#' @export
#'
#' @examples
dweib <- function(x, logitp, lnalpha, lnbeta, delta = 1, log = FALSE) {

prob <- exp(logitp) / (1 + exp(logitp))
Expand All @@ -73,10 +67,8 @@ dweib <- function(x, logitp, lnalpha, lnbeta, delta = 1, log = FALSE) {
#' @param delta width of interval with positive support (x in (0; delta))
#' @param log logical; if TRUE, probabilities p are given as log(p)
#'
#' @return
#' @return Density. The length of the result is the maximum of the lengths of the numerical arguments.
#' @export
#'
#' @examples
dexp <- function(x, logitp, lnbeta, delta = 1, log = FALSE) {

prob <- exp(logitp) / (1 + exp(logitp))
Expand Down
5 changes: 1 addition & 4 deletions R/sandwich.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@
#' @param fit an object of class "wtd" returned by `ranwtdttt()`
#'
#' @return sand_vcov returns a matrix
#' @importFrom stats model.matrix
#' @importFrom numDeriv grad
#'
#' @examples
#' @importFrom stats model.matrix numericDeriv
sand_vcov <- function(fit) {
# parse model formula components
parm_form <- unlist(strsplit(gsub(" ", "", unlist(strsplit(fit@formula, ":", fixed=T))[2]), ",", fixed=T))
Expand Down
1 change: 1 addition & 0 deletions R/wtd-class.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#'
#' @exportClass wtd
#' @importClassesFrom bbmle mle2
#' @importMethodsFrom bbmle summary
#'
setClass("wtd", contains="mle2", slots=c(delta="numeric", dist="character",
depvar="character", idvar="character",
Expand Down
Binary file modified Rwtdttt.pdf
Binary file not shown.
3 changes: 3 additions & 0 deletions man/dexp.Rd

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

3 changes: 3 additions & 0 deletions man/dlnorm.Rd

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

3 changes: 3 additions & 0 deletions man/dweib.Rd

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

0 comments on commit 3323c48

Please sign in to comment.