Skip to content

Commit 4c613cf

Browse files
fix all cran comments
1 parent d529260 commit 4c613cf

58 files changed

Lines changed: 143 additions & 34 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CRAN-SUBMISSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Version: 0.5.0
2-
Date: 2024-11-11 14:52:47 UTC
3-
SHA: 6383cfbb58ebad20005d83d85265f7f010208320
2+
Date: 2024-11-12 15:06:04 UTC
3+
SHA: d52926094d51d21be79ff3d152278ffb53cb831b

DESCRIPTION

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ Authors@R: c(person("Richard", "Hooijmaijers", email = "richardhooijmaijers@gmai
66
person("LAPP Consultants",email = "info@lapp.nl", role=c("fnd","cph")),
77
person("Matthew Fidler",role=c("ctb")),
88
person("Veerle van Leemput",role=c("ctb")))
9-
Description: An interface for the 'nlmixr2' package. Furthermore additional functions
10-
are included to work with the 'nlmixr2' package through the command line.
9+
Description: An R shiny user interface for the 'nlmixr2' (Fidler et al (2019) <doi:10.1002/psp4.12445>) package,
10+
designed to simplify the modeling process for users. Additionally, this package includes supplementary functions
11+
to further enhances the usage of 'nlmixr2'.
1112
Depends:
1213
R (>= 3.5.0),
1314
shiny,

R/fit_plot.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fit_plot <- function(dfrm,type="xpose",by="ID",idv="TIME",obs="DV",pred="PRED",i
4242

4343
if(type=="xpose"){
4444
if((length(by)==1 && by!="ID") || length(by)>1 || idv!="TIME" || obs!="DV" || pred!="PRED" || ipred!="IPRED" || grp!="ID") stop("Changing variables does not work with xpose type of plots")
45-
if("nlmixr2" %in% rownames(installed.packages())){
45+
if(length(find.package("nlmixr2", quiet = TRUE))>0){
4646
xpdb <- xpose.nlmixr2::xpose_data_nlmixr2(dfrm)
4747
}else{
4848
stop("nlmixr2 package is not installed")

R/get_meta.r

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#' @param mdl character with the path of the model function
77
#'
88
#' @export
9+
#' @return A list with the models meta data
910
#' @examples
1011
#'
1112
#' \dontrun{

R/get_proj.r

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#------------------------------------------ get_proj ------------------------------------------
22
#' Read in and update model results in project object
33
#'
4-
#' This function creates or updates a project object with models and/or results emerged from nlmixr runs
4+
#' This function creates or updates a project object with models and/or results emerged from nlmixr2 runs.
55
#' A check is performed to see if newer results are present and only updates these.
66
#'
77
#' @param projloc character with the base location of the shinyMixR project
88
#' @param geteval logical indicating if the model functions should be evaluated
99
#'
1010
#' @export
11+
#' @return A named list with information for each model in the 'projloc'
1112
#' @examples
1213
#'
1314
#' \dontrun{

R/gof_plot.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#' }
3535
gof_plot <- function(dfrm,type="xpose",mdlnm=NULL,colby=NULL,ptype="all",outnm=NULL,projloc=".",title=NULL,linscale=FALSE,...){
3636
if(type=="xpose" & !is.null(colby)) stop("Color by does not work with xpose type of plots")
37-
if(type=="xpose" && "nlmixr2" %in% rownames(installed.packages())){
37+
if(type=="xpose" && length(find.package("nlmixr2", quiet = TRUE))>0){
3838
dat <- xpose.nlmixr2::xpose_data_nlmixr2(dfrm)
3939
}else{
4040
dat <- as.data.frame(dfrm)

R/misc.r

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#' @param x a numerical vector
66
#' @param sdig a single number defining the number of significant digits
77
#' @export
8+
#' @return A character vector with formatted numbers
89
sigdigs <- function(x,sdig=3){
910
om <- floor(log10(abs(x)))
1011
dp <- sdig-om-1
@@ -20,6 +21,7 @@ sigdigs <- function(x,sdig=3){
2021
#' @param type character with the type of alert to display
2122
#' @param ... other arguments passed to class
2223
#' @export
24+
#' @return No return value, called for side effects
2325
myalert <- function(text,type,...){
2426
shinyWidgets::sendSweetAlert(text = text,type = type,
2527
showClass=list(backdrop='swal2-noanimation'),width="30%",
@@ -33,6 +35,7 @@ myalert <- function(text,type,...){
3335
#' This function provides a custom theme for ggplot output
3436
#' @param fontsize numeric with the default fontsize passed through to theme
3537
#' @export
38+
#' @return A list with ggplot theme elements
3639
theme_shinyMixR <- function(fontsize=12){
3740
ret <- theme_bw(base_size = fontsize) +
3841
theme(panel.border = element_rect(color="grey30", size=0.75),

R/module_dataexplore.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#' @param id Module id
77
#'
88
#' @export
9+
#' @return A list of html tags used for th UI of the app
910
module_dataexplore_ui <- function(id) {
1011
ns <- NS(id)
1112
tagList(
@@ -143,6 +144,7 @@ module_dataexplore_ui <- function(id) {
143144
#' @param r reactive values object that is defined top-level
144145
#'
145146
#' @export
147+
#' @return No return value, called for side effects
146148
module_dataexplore_server <- function(id, r) {
147149
moduleServer(id, function(input, output, session) {
148150

R/module_edit.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#' @param id Module id
77
#'
88
#' @export
9+
#' @return A list of html tags used for th UI of the app
910
module_edit_ui <- function(id) {
1011
ns <- NS(id)
1112
tagList(
@@ -25,6 +26,7 @@ module_edit_ui <- function(id) {
2526
#' @param settings reactive value with the app settings
2627
#'
2728
#' @export
29+
#' @return No return value, called for side effects
2830
module_edit_server <- function(id, r, settings) {
2931
moduleServer(id, function(input, output, session) {
3032
# Adapt model list based on selected project location

R/module_fitplots.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#' @param proj_obj Project object
88
#'
99
#' @export
10+
#' @return A list of html tags used for th UI of the app
1011
module_fitplots_ui <- function(id, proj_obj) {
1112
ns <- NS(id)
1213
tagList(
@@ -42,6 +43,7 @@ module_fitplots_ui <- function(id, proj_obj) {
4243
#' @param settings reactive value with the app settings
4344
#'
4445
#' @export
46+
#' @return No return value, called for side effects
4547
module_fitplots_server <- function(id, r, settings) {
4648
moduleServer(id, function(input, output, session) {
4749
# Adapt model list based on selected project location

0 commit comments

Comments
 (0)