Skip to content

Commit a0d5a80

Browse files
Merge pull request #95 from rsquaredacademy/develop
Internal changes
2 parents e970aba + ea22281 commit a0d5a80

Some content is hidden

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

78 files changed

+31
-4323
lines changed

DESCRIPTION

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: blorr
22
Type: Package
33
Title: Tools for Developing Binary Logistic Regression Models
4-
Version: 0.2.1.9000
4+
Version: 0.2.2
55
Authors@R: person("Aravind", "Hebbali", email = "hebbali.aravind@gmail.com", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0001-9220-9669"))
77
Description: Tools designed to make it easier for beginner and intermediate users to build and validate
@@ -20,33 +20,23 @@ Imports:
2020
dplyr,
2121
e1071,
2222
ggplot2,
23-
glue,
2423
gridExtra,
2524
magrittr,
2625
purrr,
2726
Rcpp,
2827
rlang,
2928
scales,
30-
shiny,
3129
stats,
3230
tibble,
33-
utils
31+
utils,
32+
xplorerr
3433
Suggests:
3534
covr,
36-
descriptr,
3735
grid,
3836
ineq,
39-
jsonlite,
40-
lubridate,
4137
knitr,
42-
readr,
43-
readxl,
4438
rmarkdown,
45-
shinyBS,
46-
shinythemes,
47-
stringr,
4839
testthat,
49-
tidyr,
5040
vdiffr
5141
License: MIT + file LICENSE
5242
URL: URL: https://blorr.rsquaredacademy.com/, https://github.com/rsquaredacademy/blorr

NAMESPACE

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ importFrom(ggplot2,xlab)
166166
importFrom(ggplot2,xlim)
167167
importFrom(ggplot2,ylab)
168168
importFrom(ggplot2,ylim)
169-
importFrom(glue,glue)
170169
importFrom(gridExtra,grid.arrange)
171170
importFrom(gridExtra,marrangeGrob)
172171
importFrom(magrittr,"%<>%")

NEWS.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# blorr 0.2.2
2+
3+
This is a patch release to fix CRAN errors.
4+
15
# blorr 0.2.1
26

37
This is a patch release to fix bugs in the app.
@@ -22,4 +26,4 @@ choice ([#64](https://github.com/rsquaredacademy/blorr/issues/64))
2226

2327
# blorr 0.1.0
2428

25-
Initial release
29+
Initial release

R/blr-launch-app.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ blr_launch_app <- function() {
1919
check_suggests('shinythemes')
2020
check_suggests('stringr')
2121
check_suggests('tidyr')
22-
23-
shiny::runApp(appDir = system.file("application", package = "blorr"))
22+
23+
xplorerr::app_logistic_regression()
2424

2525
}
26-
26+

R/blr-lorenz-curve.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ blr_lorenz_curve <- function(model, data = NULL, title = "Lorenz Curve",
109109
geom_line(aes(x = `cum_1s_per`, y = `cum_0s_per`),
110110
color = lorenz_curve_col) +
111111
geom_line(aes(x = `cum_1s_per`, y = `cum_1s_per`), color = diag_line_col) +
112-
ggtitle(label = title, subtitle = glue("Gini Index = ", {g_index})) +
112+
ggtitle(label = title, subtitle = paste0("Gini Index = ", g_index)) +
113113
xlab(xaxis_title) + ylab(yaxis_title) +
114114
theme(plot.title = element_text(hjust = 0.5),
115115
plot.subtitle = element_text(hjust = 0.5))

R/blr-lrtest.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ lr_reduced_model <- function(full_model) {
8181

8282
dat <-
8383
full_model %>%
84-
use_series(data)
84+
use_series(data)
8585

8686

87-
glm(glue(dep, " ~ 1"), data = dat, family = binomial(link = "logit"))
87+
glm(paste0(dep, " ~ 1"), data = dat, family = binomial(link = "logit"))
8888

8989
}
9090

R/blr-output.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,12 @@ print_model_fit_stats <- function(x) {
230230
cat(fc("Model Fit Statistics", w), "\n")
231231
cat(rep("-", w), sep = "", "\n")
232232
col1names <- c(
233-
"Log-Lik Intercept Only:", glue("Deviance(", x$dev_df, "):"), "",
233+
"Log-Lik Intercept Only:", paste0("Deviance(", x$dev_df, "):"), "",
234234
"MCFadden's R2", "ML (Cox-Snell) R2:",
235235
"McKelvey & Zavoina's R2:", "Count R2:", "BIC:"
236236
)
237237
col3names <- c(
238-
"Log-Lik Full Model:", glue("LR(", x$lr_df, "):"), "Prob > LR:",
238+
"Log-Lik Full Model:", paste0("LR(", x$lr_df, "):"), "Prob > LR:",
239239
"McFadden's Adj R2:", "Cragg-Uhler(Nagelkerke) R2:",
240240
"Efron's R2:", "Adj Count R2:", "AIC:"
241241
)

R/blr-stepwise-backward-regression.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ blr_step_p_backward.default <- function(model, prem = 0.3, details = FALSE, ...)
135135
} else {
136136
end <- TRUE
137137
cat("\n")
138-
cat(crayon::bold$red(glue("No more variables satisfy the condition of p value = {prem}")))
138+
cat(crayon::bold$red(paste0("No more variables satisfy the condition of p value = ", prem)))
139139
cat("\n")
140140
}
141141
)
@@ -163,7 +163,7 @@ blr_step_p_backward.default <- function(model, prem = 0.3, details = FALSE, ...)
163163
)
164164
print(fi)
165165

166-
final_model <- glm(paste(response, "~", paste(preds, collapse = " + ")),
166+
final_model <- glm(paste(response, "~", paste(preds, collapse = " + ")),
167167
data = l, family = binomial(link = 'logit'))
168168

169169
out <- list(removed = rpred,

R/blr-stepwise-regression.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ blr_step_p_both.default <- function(model, pent = 0.1, prem = 0.3, details = FAL
8989
pvals <- c()
9090
tvals <- c()
9191
step <- 1
92-
ppos <- step
92+
ppos <- step
9393
aic <- c()
9494
bic <- c()
9595
dev <- c()
@@ -255,8 +255,8 @@ blr_step_p_both.default <- function(model, pent = 0.1, prem = 0.3, details = FAL
255255
# cat("\n\n")
256256
# }
257257

258-
m2 <- glm(paste(response, "~", paste(preds, collapse = " + ")), l,
259-
family = binomial(link = 'logit'))
258+
m2 <- glm(paste(response, "~", paste(preds, collapse = " + ")), l,
259+
family = binomial(link = 'logit'))
260260
m_sum <- Anova(m2, test.statistic = "Wald")
261261
pvals_r <- m_sum$`Pr(>Chisq)`
262262
# tvals_r <- m_sum$Chisq[ppos]
@@ -310,7 +310,7 @@ blr_step_p_both.default <- function(model, pent = 0.1, prem = 0.3, details = FAL
310310
}
311311
} else {
312312
cat("\n")
313-
cat(crayon::bold$red(glue("No more variables to be added/removed.")))
313+
cat(crayon::bold$red(paste0("No more variables to be added/removed.")))
314314
cat("\n")
315315
break
316316
}
@@ -326,7 +326,7 @@ blr_step_p_both.default <- function(model, pent = 0.1, prem = 0.3, details = FAL
326326
)
327327
print(fi)
328328

329-
final_model <- glm(paste(response, "~", paste(preds, collapse = " + ")),
329+
final_model <- glm(paste(response, "~", paste(preds, collapse = " + ")),
330330
data = l, family = binomial(link = 'logit'))
331331

332332
out <- list(

R/blr-utils.R

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#' @importFrom dplyr mutate if_else pull slice
33
#' @importFrom tibble tibble as_tibble
44
#' @importFrom rlang sym eval_tidy !!
5-
#' @importFrom glue glue
65
#' @importFrom stats coef confint binomial df.residual glm terms
76
#' @importFrom utils data
87
response_var <- function(model) {
@@ -186,10 +185,10 @@ i_model <- function(model) {
186185

187186
dat <-
188187
model %>%
189-
use_series(data)
188+
use_series(data)
190189

191190
glm(
192-
glue(dep, " ~ 1"), data = dat,
191+
paste0(dep, " ~ 1"), data = dat,
193192
family = binomial(link = "logit")
194193
)
195194

@@ -284,13 +283,13 @@ mod_sel_data <- function(model) {
284283

285284
#' @importFrom utils packageVersion menu install.packages
286285
check_suggests <- function(pkg) {
287-
286+
288287
pkg_flag <- tryCatch(utils::packageVersion(pkg), error = function(e) NA)
289-
288+
290289
if (is.na(pkg_flag)) {
291-
290+
292291
msg <- message(paste0('\n', pkg, ' must be installed for this functionality.'))
293-
292+
294293
if (interactive()) {
295294
message(msg, "\nWould you like to install it?")
296295
if (utils::menu(c("Yes", "No")) == 1) {
@@ -300,7 +299,7 @@ check_suggests <- function(pkg) {
300299
}
301300
} else {
302301
stop(msg, call. = FALSE)
303-
}
302+
}
304303
}
305304

306-
}
305+
}

0 commit comments

Comments
 (0)