Skip to content

Commit 2c017f9

Browse files
authored
Merge pull request #228 from microsoft/refactor/streamline-network_p2p
Merging - `v1.9.0` has been accepted and is on its way to CRAN.
2 parents 7af58b4 + 4a3dd04 commit 2c017f9

Some content is hidden

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

77 files changed

+779
-1098
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
^\.github$
1515
^CONTRIBUTORS.svg$
1616
man-roxygen
17+
lastMiKTeXException
1718

1819
# Ignore all figures
1920
^man/figures

.github/workflows/R-CMD-check.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
R-CMD-check:
77
runs-on: macOS-latest
88
steps:
9-
- uses: actions/checkout@v2
9+
- uses: actions/checkout@v3
1010
- uses: r-lib/actions/setup-r@v2-branch
1111
- name: Install dependencies
1212
run: |
@@ -17,4 +17,4 @@ jobs:
1717
env:
1818
_R_CHECK_FORCE_SUGGESTS_: true
1919
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
20-
shell: Rscript {0}
20+
shell: Rscript {0}

CRAN-SUBMISSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Version: 1.8.1
2-
Date: 2023-01-27 11:02:41 UTC
3-
SHA: da6fe2da817d04f06e90017f92f82cb788d093df
1+
Version: 1.9.0
2+
Date: 2023-08-21 13:44:41 UTC
3+
SHA: f562f477da8f7fcc2311aa6a860badb1cf042b91

DESCRIPTION

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: wpa
22
Type: Package
33
Title: Tools for Analysing and Visualising Viva Insights Data
4-
Version: 1.8.1
4+
Version: 1.9.0
55
Authors@R: c(
66
person(given = "Martin", family = "Chan", role = c("aut", "cre"), email = "[email protected]"),
77
person(given = "Carlos", family = "Morales", role = "aut", email = "[email protected]"),
@@ -56,12 +56,11 @@ Imports:
5656
ggwordcloud,
5757
methods,
5858
data.table
59-
RoxygenNote: 7.2.0
59+
RoxygenNote: 7.2.3
6060
Roxygen: list(markdown = TRUE)
6161
Suggests:
6262
knitr,
6363
extrafont,
64-
leiden,
6564
lifecycle,
6665
fst,
6766
glue,

NAMESPACE

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,6 @@ export(mgrcoatt_dist)
134134
export(mgrrel_matrix)
135135
export(network_describe)
136136
export(network_g2g)
137-
export(network_leiden)
138-
export(network_louvain)
139137
export(network_p2p)
140138
export(network_summary)
141139
export(one2one_dist)
@@ -193,7 +191,6 @@ export(workpatterns_rank)
193191
export(workpatterns_report)
194192
export(wrap)
195193
export(wrap_text)
196-
import(DT)
197194
import(dplyr)
198195
import(ggplot2)
199196
import(ggraph)
@@ -209,10 +206,6 @@ importFrom(data.table,rbindlist)
209206
importFrom(dplyr,`%>%`)
210207
importFrom(dplyr,across)
211208
importFrom(dplyr,mutate)
212-
importFrom(dplyr,mutate_if)
213-
importFrom(grDevices,rainbow)
214-
importFrom(graphics,legend)
215-
importFrom(graphics,par)
216209
importFrom(htmltools,HTML)
217210
importFrom(igraph,graph_from_data_frame)
218211
importFrom(magrittr,"%>%")

NEWS.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# wpa 1.9.0
2+
3+
Updates to `network_p2p()`, with breaking changes to the argument, addressing issue #225:
4+
5+
- `network_p2p()` now has a `centrality` argument for computing and visualizing centrality as node sizes in the network plot
6+
- the `algorithm` argument is renamed to `layout` for better intuitiveness
7+
- Improved consistency and intuitiveness of the API, with `style` argument now controlling the network plotting mechanism and `return` argument controlling whether plots are generated interactively or saved as PDF
8+
- Added a large number of community detection algorithms from `igraph`
9+
10+
`network_summary()` adds the ability to return pagerank.
11+
12+
This version also includes some minor dependency maintenance done to `create_dt()`.
13+
114
# wpa 1.8.1
215

316
- fixed issue due to a 'tidyr' update (see #233).

R/IV_by_Period.R

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,16 @@
4040
#' @family Time-series
4141
#'
4242
#' @examples
43+
#' \donttest{
4344
#' # Returns a data frame
4445
#' sq_data %>%
4546
#' IV_by_period(
46-
#' before_start = "2019-11-03",
47-
#' before_end = "2019-11-09",
48-
#' after_start = "2019-11-10",
49-
#' after_end = "2019-11-16"
47+
#' before_start = "2019-12-15",
48+
#' before_end = "2019-12-29",
49+
#' after_start = "2020-01-05",
50+
#' after_end = "2020-01-26"
5051
#' )
51-
#'
52+
#' }
5253
#' @export
5354

5455
IV_by_period <-

R/collaboration_area.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
#' @family Collaboration
3939
#'
4040
#' @examples
41+
#' \donttest{
4142
#' # Return plot with total (default)
4243
#' collaboration_area(sq_data)
4344
#'
@@ -46,6 +47,7 @@
4647
#'
4748
#' # Return summary table
4849
#' collaboration_area(sq_data, return = "table")
50+
#' }
4951
#'
5052
#' @return
5153
#' A different output is returned depending on the value passed to the `return` argument:

R/create_ITSA.R

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@
6464
#'
6565
#'
6666
#' @examples
67+
#' \donttest{
6768
#' # Returns summary table
68-
#'
6969
#' create_ITSA(
7070
#' data = sq_data,
71-
#' before_start = "11/03/2019",
72-
#' before_end = "12/15/2019",
73-
#' after_start = "12/29/2019",
71+
#' before_start = "12/15/2019",
72+
#' before_end = "12/29/2019",
73+
#' after_start = "1/5/2020",
7474
#' after_end = "1/26/2020",
7575
#' ac_lags_max = 7,
7676
#' return = "table")
@@ -80,15 +80,16 @@
8080
#' plot_list <-
8181
#' create_ITSA(
8282
#' data = sq_data,
83-
#' before_start = "11/03/2019",
84-
#' before_end = "12/15/2019",
85-
#' after_start = "12/29/2019",
83+
#' before_start = "12/15/2019",
84+
#' before_end = "12/29/2019",
85+
#' after_start = "1/5/2020",
8686
#' after_end = "1/26/2020",
8787
#' ac_lags_max = 7,
8888
#' return = 'plot')
8989
#'
9090
#' # Extract a plot as an example
9191
#' plot_list$Workweek_span
92+
#' }
9293
#'
9394
#' @export
9495

R/create_IV.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
#'
6262
#' # Return summary
6363
#' sq_data %>%
64-
#' dplyr::mutate(X = ifelse(Collaboration_hours > 2, 1, 0)) %>%
64+
#' dplyr::mutate(X = ifelse(Collaboration_hours > 10, 1, 0)) %>%
6565
#' create_IV(outcome = "X",
6666
#' predictors = c("Email_hours", "Meeting_hours"),
6767
#' return = "summary")

0 commit comments

Comments
 (0)