Skip to content

Commit

Permalink
modify the example of summarize_oolong, yet another CRAN submission
Browse files Browse the repository at this point in the history
  • Loading branch information
chainsawriot committed Mar 20, 2020
1 parent 3ee4fce commit a3fab75
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: oolong
Title: Create Validation Tests for Automated Content Analysis
Version: 0.3.3
Version: 0.3.4
Authors@R:
person(given = "Chung-hong",
family = "Chan",
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# oolong 0.3.3
# oolong 0.3.4

* Initial CRAN version.
19 changes: 10 additions & 9 deletions R/oolong_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,16 @@ summarise_oolong <- function(..., target_value = NULL) {
#' }
#' A useful summary of an object can be obtained either by \code{\link{print.oolong_summary}} or \code{\link{plot.oolong_summary}}. For details, please see the overview vignette: \code{vignette("overview", package = "oolong")}
#' @examples
#' \donttest{
#' data(abstracts_stm)
#' oolong_test1 <- create_oolong(abstracts_stm)
#' oolong_test2 <- clone_oolong(oolong_test1)
#' oolong_test1$do_word_intrusion_test()
#' oolong_test2$do_word_intrusion_test()
#' oolong_test1$lock()
#' oolong_test2$lock()
#' summarize(oolong_test1, oolong_test2)
#' # Please try this example in interactive R sessions only.
#' if (interactive()) {
#' data(abstracts_stm)
#' oolong_test1 <- create_oolong(abstracts_stm)
#' oolong_test2 <- clone_oolong(oolong_test1)
#' oolong_test1$do_word_intrusion_test()
#' oolong_test2$do_word_intrusion_test()
#' oolong_test1$lock()
#' oolong_test2$lock()
#' summarize_oolong(oolong_test1, oolong_test2)
#' }
#' @author Chung-hong Chan
#' @references
Expand Down
6 changes: 6 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Resubmission (20-Mar-2020) - version 0.3.4

functions which are supposed to only run interactively (e.g. shiny) should be wrapped in if(interactive()). Is this the case?

With reference to similar packages (editData etc.), wrapping this example in `if(interactive())` makes more sense. I have done so for the example of `summarize_ooolong`. Thank you very much!

## Resubmission (16-Mar-2020) - version 0.3.3

Regarding \dontrun in summarize_oolong.Rd:
Expand Down
19 changes: 10 additions & 9 deletions man/summarize_oolong.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion overview_gh.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ abstracts_dfm

``` r
oolong_test <- create_oolong(abstracts_warplda, abstracts$text, input_dfm = abstracts_dfm)
#> INFO [16:02:33.937] early stopping at 50 iteration
#> INFO [13:40:42.066] early stopping at 50 iteration
oolong_test
#> An oolong test object with k = 20, 0 coded.
#> Use the method $do_word_intrusion_test() to do word intrusion test.
Expand Down

0 comments on commit a3fab75

Please sign in to comment.