Skip to content

Commit

Permalink
Merge branch 'main' into cran-mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
martinctc committed Jun 6, 2024
2 parents 42540b1 + e3624fd commit 05e4512
Show file tree
Hide file tree
Showing 126 changed files with 420 additions and 438 deletions.
6 changes: 3 additions & 3 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
Version: 1.9.0
Date: 2023-08-21 13:44:41 UTC
SHA: f562f477da8f7fcc2311aa6a860badb1cf042b91
Version: 1.9.1
Date: 2024-06-06 12:00:40 UTC
SHA: 0d960e8011577d9963a3be121dc52ef78cde61fb
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: wpa
Type: Package
Title: Tools for Analysing and Visualising Viva Insights Data
Version: 1.9.0
Version: 1.9.1
Authors@R: c(
person(given = "Martin", family = "Chan", role = c("aut", "cre"), email = "[email protected]"),
person(given = "Carlos", family = "Morales", role = "aut", email = "[email protected]"),
Expand All @@ -25,7 +25,7 @@ Description: Opinionated functions that enable easier and faster
This package adheres to 'tidyverse' principles and works well with the pipe syntax.
'wpa' is built with the beginner-to-intermediate R users in mind, and is optimised for
simplicity.
URL: https://github.com/microsoft/wpa/
URL: https://github.com/microsoft/wpa/, https://microsoft.github.io/wpa/
BugReports: https://github.com/microsoft/wpa/issues/
License: MIT + file LICENSE
Encoding: UTF-8
Expand Down Expand Up @@ -56,7 +56,7 @@ Imports:
ggwordcloud,
methods,
data.table
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
Suggests:
knitr,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# wpa 1.9.1

- Minor bug fixes and aesthetic improvements.

# wpa 1.9.0

Updates to `network_p2p()`, with breaking changes to the argument, addressing issue #225:
Expand Down
17 changes: 17 additions & 0 deletions R/create_IV.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,23 @@ create_IV <- function(data,
exc_sig = FALSE,
return = "plot"){

# Input validation
if (!is.data.frame(data)) {
stop("The 'data' parameter should be a data frame.")
}

if (!is.null(predictors) && !all(predictors %in% names(data))) {
stop("Some predictors are not present in the data.")
}

if (!outcome %in% names(data)) {
stop("The outcome variable is not present in the data.")
}

if (!all(data[[outcome]] %in% c(0, 1))) {
stop("The outcome variable should be binary (0 or 1).")
}

# Preserve string ----------------------------------------------------------
pred_chr <- NULL
pred_chr <- predictors
Expand Down
10 changes: 9 additions & 1 deletion R/create_boxplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ create_boxplot <- function(data,
arrange(desc(mean)) %>%
pull(group)

## x axis label handling
if(hrvar == "Total"){
xlabel<-""
}
else{
xlabel<-hrvar
}

plot_object <-
plot_data %>%
mutate(group = factor(group, levels = group_ord)) %>%
Expand All @@ -147,7 +155,7 @@ create_boxplot <- function(data,
tolower(clean_nm),
"by",
tolower(camel_clean(hrvar)))) +
xlab(hrvar) +
xlab(xlabel) +
ylab(paste("Average", clean_nm)) +
labs(caption = extract_date_range(data, return = "text"))

Expand Down
8 changes: 8 additions & 0 deletions R/create_stacked.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ create_stacked <- function(data,
data %>%
check_inputs(requirements = required_variables)

## Plot Title Handling
if(is(object = metrics, class2 = "character") & length(metrics) == 1){
plot_title <- us_to_space(metrics)
}
else{ #vector of strings
plot_title <- paste(plot_title, collapse = ", ")
}

## Handle `legend_lab`
if(is.null(legend_lab)){
legend_lab <- gsub("_", " ", metrics)
Expand Down
2 changes: 1 addition & 1 deletion R/themes.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#'
#' @param font_family Character value specifying the font family
#' to be used in the plot. The default value is `"Segoe UI"`. To ensure
#' you can use this font, install and load {extrafont} prior to
#' you can use this font, install and load 'extrafont' prior to
#' plotting. There is an initialisation process that is described by:
#' <https://stackoverflow.com/questions/34522732/changing-fonts-in-ggplot2>
#'
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# wpa <img src="https://raw.githubusercontent.com/microsoft/wpa/main/man/figures/logo2.png" align="right" width=15% />

[![R build status](https://github.com/microsoft/wpa/workflows/R-CMD-check/badge.svg)](https://github.com/microsoft/wpa/actions/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/license/mit/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/license/mit)
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
[![CRAN status](https://www.r-pkg.org/badges/version/wpa)](https://CRAN.R-project.org/package=wpa/)
[![CRAN last month downloads](https://cranlogs.r-pkg.org/badges/last-month/wpa?color=green/)](https://cran.r-project.org/package=wpa/)
Expand Down
59 changes: 2 additions & 57 deletions cran-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,62 +7,7 @@

0 errors | 0 warnings | 0 note

## Submission 1.9.0
## Submission 1.9.1

Refactor network analysis functions and minor chores.
Minor bug fixes

## Submission 1.8.1

Patch to fix bug due to an update in 'tidyr' dependency

## Submission 1.8.0

New functions and improving outputs of existing functions

## Submission 1.7.0

Bug fixes, new features, and removal of archived dependency 'portes'

## Submission 1.6.4

Minor bug fixes and refactoring.

## Submission 1.6.3

New visualization feature and refactoring.

## Submission 1.6.2

Minor bug fixes.

## Submission 1.6.1

Minor bug fixes.

## Submission 1.6.0

Minor release implementing several features and fixing bugs logged on GitHub.

## Submission 1.5.0

Minor release with improvements to visualization functions.


## Submission 1.4.3

Addressed final comments from CRAN on Rd files without a \value{} tag.

## Submission 1.4.2

Spotted and fixed an issue with package names in single quotes in title and
description.

## Submission 1.4.1

Addressed following comments from previous CRAN submission

- Having package names in single quotes in title and description.
- Add \value to .Rd files and explain function results.
- Removed examples for unexported functions.
- Removed examples that write in user's home filespace.
- Removed usage of `installed.packages()`, using `find.package()` instead.
2 changes: 1 addition & 1 deletion man/IV_by_period.Rd

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

6 changes: 3 additions & 3 deletions man/afterhours_dist.Rd

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

6 changes: 3 additions & 3 deletions man/afterhours_fizz.Rd

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

6 changes: 3 additions & 3 deletions man/afterhours_line.Rd

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

6 changes: 3 additions & 3 deletions man/afterhours_rank.Rd

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

6 changes: 3 additions & 3 deletions man/afterhours_summary.Rd

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

6 changes: 3 additions & 3 deletions man/afterhours_trend.Rd

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

6 changes: 3 additions & 3 deletions man/check_query.Rd

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

Loading

0 comments on commit 05e4512

Please sign in to comment.