-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
JooYoung Seo
committed
Dec 27, 2020
1 parent
6b03093
commit 314b9d7
Showing
3 changed files
with
22 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,23 +30,23 @@ | |
#' @author Soyoung Choi, \email{[email protected]} | ||
|
||
num_thread <- function(mbox_df) { | ||
if(!inherits(mbox_df, "mbox_df")) { | ||
stop("You need an mbox_df object for this function: Convert your mbox file through `read_mbox()` first.") | ||
} | ||
if (!inherits(mbox_df, "mbox_df")) { | ||
stop("You need an mbox_df object for this function: Convert your mbox file through `read_mbox()` first.") | ||
} | ||
|
||
mbox_df %>% | ||
is_thread() %>% | ||
sum(., na.rm = TRUE) | ||
is_thread() %>% | ||
sum(., na.rm = TRUE) | ||
} | ||
|
||
|
||
#' @rdname num_thread | ||
#' @export | ||
|
||
is_thread <- function(mbox_df) { | ||
if(!inherits(mbox_df, "mbox_df")) { | ||
stop("You need an mbox_df object for this function: Convert your mbox file through `read_mbox()` first.") | ||
} | ||
if (!inherits(mbox_df, "mbox_df")) { | ||
stop("You need an mbox_df object for this function: Convert your mbox file through `read_mbox()` first.") | ||
} | ||
|
||
mbox_df$num_discussants > 1 | ||
} |