Skip to content

Commit 5ed3496

Browse files
author
Ariana Strandburg-Peshkin
committed
Fixed NA issue introduced by get_together_sticky that was breaking tests. NA handling is now a bit simplified. If any individuals have NAs they are considered 'not together' with anyone, and any ambiguous times that are not connected to a period of connectedness are considered 'apart'. Need to test a few more edge cases involving NAs and periods of together vs apartness at the beginning/end of sequences.
1 parent 7c93b1f commit 5ed3496

5 files changed

+17
-9
lines changed

R/get_together_sticky.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ get_together_sticky <- function(together_inner, together_outer){
9595
}
9696

9797
#any NAs are not considered together
98-
together_ij[which(is.na(together_inner))] <- NA
98+
together_ij[which(is.na(together_ij))] <- FALSE
9999

100100
return(together_ij)
101101
}

R/identify_splits_and_merges.R

+1-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
#'
1414
#'NA handling:
1515
#' Individuals are considered not together if either of their positions is not known. If a period of connectedness runs into an NA,
16-
#'individuals will be considered as connected up until that NA. However, if an
17-
#'ambiguous period (between the two thresholds) runs into an NA, individuals
18-
#'will be considered
16+
#'individuals will be considered as connected up until that NA.
1917
#'Once connectedness of dyads is determined, merge dyads together into groups by
2018
#'using DBSCAN on 1 - `together` as the distance matrix, with `eps` equal to
2119
#'something small (.01 in the code).

inst/tinytest/test-known-issues.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# skip
2-
#exit_file()
2+
exit_file()
33

44
# Analyse split and merge
55
# before time is not tidx - time windwo

man/get_together_sticky.Rd

+11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/identify_splits_and_merges.Rd

+3-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)