Skip to content

Commit 476f013

Browse files
authored
Merge pull request #233 from DavisVaughan/fix/tidyr-1-3-0
Eagerly convert from and to data.table and patch `v1.8.1`
2 parents 0c57b48 + bc5fa7d commit 476f013

File tree

7 files changed

+17
-8
lines changed

7 files changed

+17
-8
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: macOS-latest
88
steps:
99
- uses: actions/checkout@v2
10-
- uses: r-lib/actions/setup-r@master
10+
- uses: r-lib/actions/setup-r@v2-branch
1111
- name: Install dependencies
1212
run: |
1313
install.packages(c("remotes", "rcmdcheck"))

CRAN-SUBMISSION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Version: 1.8.0
2-
Date: 2022-07-05 14:56:34 UTC
3-
SHA: da3ceafbd54598a196fe0c3c1b29f58f1adc728d
1+
Version: 1.8.1
2+
Date: 2023-01-27 11:02:41 UTC
3+
SHA: da6fe2da817d04f06e90017f92f82cb788d093df

DESCRIPTION

Lines changed: 1 addition & 1 deletion
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.0
4+
Version: 1.8.1
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]"),

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# wpa 1.8.1
2+
3+
- fixed issue due to a 'tidyr' update (see #233).
4+
15
# wpa 1.8.0
26

37
- Updated and improved output and algorithm for `workpatterns_classify()`

R/workpatterns_classify_bw.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,15 +234,17 @@ workpatterns_classify_bw <- function(data,
234234
WpA_classify <-
235235
WpA_classify[, c("PersonId", "Date", "Active_Hours", "HourType", "sent")] %>%
236236
.[, .(sent = sum(sent)), by = c("PersonId", "Date", "Active_Hours", "HourType")] %>%
237-
tidyr::spread(HourType, sent)%>%
237+
dplyr::as_tibble() %>%
238+
tidyr::spread(HourType, sent) %>%
238239
left_join(WpA_classify %>% ## Calculate first and last activity for day_span
239240
filter(sent > 0)%>%
240241
group_by(PersonId, Date)%>%
241242
summarise(First_signal = min(Start),
242243
Last_signal = max(End)),
243244
by = c("PersonId","Date"))%>%
244245
mutate(Day_Span = Last_signal - First_signal,
245-
Signals_Break_hours = Day_Span - Active_Hours)
246+
Signals_Break_hours = Day_Span - Active_Hours) %>%
247+
data.table::as.data.table()
246248

247249

248250
## Working patterns classification ---------------------------------------

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# wpa <img src="https://raw.githubusercontent.com/microsoft/wpa/main/man/figures/logo2.png" align="right" width=15% />
22

33
[![R build status](https://github.com/microsoft/wpa/workflows/R-CMD-check/badge.svg)](https://github.com/microsoft/wpa/actions/)
4-
[![CodeFactor](https://www.codefactor.io/repository/github/microsoft/wpa/badge/)](https://www.codefactor.io/repository/github/microsoft/wpa/)
54
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT/)
65
[![lifecycle](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://lifecycle.r-lib.org/articles/stages.html)
76
[![CRAN status](https://www.r-pkg.org/badges/version/wpa)](https://CRAN.R-project.org/package=wpa/)

cran-comments.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77

88
0 errors | 0 warnings | 0 note
99

10+
## Submission 1.8.1
11+
12+
Patch to fix bug due to an update in 'tidyr' dependency
13+
1014
## Submission 1.8.0
1115

1216
New functions and improving outputs of existing functions

0 commit comments

Comments
 (0)