Skip to content

Commit b936185

Browse files
committed
update tests for summarize dyads and remove unassigned global variable note in summarize_dyads
1 parent 3f33591 commit b936185

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Suggests:
4141
rmarkdown,
4242
testthat (>= 3.0.0)
4343
URL: https://github.com/Reilly-ConceptsCognitionLab/ConversationAlign
44-
RoxygenNote: 7.3.2
44+
RoxygenNote: 7.3.3
4545
LazyData: true
4646
VignetteBuilder: knitr
4747
Collate:

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ importFrom(dplyr,everything)
1414
importFrom(dplyr,filter)
1515
importFrom(dplyr,first)
1616
importFrom(dplyr,group_by)
17+
importFrom(dplyr,lag)
1718
importFrom(dplyr,left_join)
1819
importFrom(dplyr,matches)
1920
importFrom(dplyr,mutate)

R/summarize_dyads.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@
4141
#' @export summarize_dyads
4242

4343
summarize_dyads <- function(df_prep, custom_lags = NULL, sumdat_only = TRUE, corr_type = 'Pearson') {
44+
# prevent note - no visible binding
45+
Lag <- Talked_First <- NULL
4446
# Validate correlation type at the start
4547
if (!corr_type %in% c("Pearson", "Spearman")) {
4648
stop("corr_type must be either 'Pearson' or 'Spearman'")

tests/testthat/test-summarize_dyads.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ test_that("required column names are present", {
99
output <- ConversationAlign::summarize_dyads(one_rhyme)
1010
# define list of required names and evaluate
1111
col_vec <- c("Event_ID", "Participant_ID", "Dimension", "Dimension_Mean", "AUC_raw", "AUC_scaled100", "Talked_First")
12+
col_vec <- c("Event_ID", "Participant_ID", "Talked_First", "Dimension", "Dimension_Mean", "AUC_raw_Immediate",
13+
"AUC_scaled100_Immediate", "AUC_raw_Lag1", "AUC_scaled100_Lag1", "TurnCorr_Lead2", "TurnCorr_Immediate", "TurnCorr_Lag2")
1214
expect_in(col_vec, colnames(output))
1315
})

0 commit comments

Comments
 (0)