Skip to content

Commit 66fa7c1

Browse files
authored
Merge pull request #29 from quanteda/v0_95
Fix CRAN issues for resubmission
2 parents 066c78e + d93923b commit 66fa7c1

15 files changed

+59
-59
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ on:
66
pull_request:
77
branches: [main, master]
88

9-
name: R-CMD-check
9+
name: R-CMD-check.yaml
10+
11+
permissions: read-all
1012

1113
jobs:
1214
R-CMD-check:
@@ -29,7 +31,7 @@ jobs:
2931
R_KEEP_PKG_SOURCE: yes
3032

3133
steps:
32-
- uses: actions/checkout@v3
34+
- uses: actions/checkout@v4
3335

3436
- uses: r-lib/actions/setup-pandoc@v2
3537

@@ -47,3 +49,4 @@ jobs:
4749
- uses: r-lib/actions/check-r-package@v2
4850
with:
4951
upload-snapshots: true
52+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: quanteda.textplots
22
Title: Plots for the Quantitative Analysis of Textual Data
3-
Version: 0.94.4
3+
Version: 0.95
44
Authors@R:
55
c(
66
person("Kenneth", "Benoit", email = "kbenoit@lse.ac.uk", role = c("cre", "aut", "cph"), comment = c(ORCID = "0000-0002-0797-564X")),
@@ -44,4 +44,4 @@ Encoding: UTF-8
4444
BugReports: https://github.com/quanteda/quanteda.textplots/issues
4545
Language: en-GB
4646
Roxygen: list(markdown = TRUE)
47-
RoxygenNote: 7.3.1
47+
RoxygenNote: 7.3.2

R/textplot_network.R

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#' Plot a network of feature co-occurrences
22
#'
3-
#' Plot an [fcm] object as a network, where edges show co-occurrences of
4-
#' features.
5-
#' @param x a [fcm] or [dfm] object
3+
#' Plot an [fcm][quanteda::fcm] object as a network, where edges show
4+
#' co-occurrences of features.
5+
#' @param x a [fcm][quanteda::fcm] or [dfm][quanteda::dfm] object
66
#' @param min_freq a frequency count threshold or proportion for co-occurrence
77
#' frequencies of features to be included.
88
#' @param omit_isolated if `TRUE`, features do not occur more frequent than
@@ -27,9 +27,9 @@
2727
#' used for `as.igraph`.
2828
#' @details Currently the size of the network is limited to 1000, because of the
2929
#' computationally intensive nature of network formation for larger matrices.
30-
#' When the [fcm] is large, users should select features using
31-
#' [fcm_select], set the threshold using `min_freq`, or implement
32-
#' own plotting function using [`as.network()`][as.network.fcm].
30+
#' When the [fcm][quanteda::fcm] is large, users should select features using
31+
#' [fcm_select()][quanteda::fcm_select], set the threshold using `min_freq`,
32+
#' or implement own plotting function using [`as.network()`][as.network.fcm].
3333
#' @author Kohei Watanabe and Stefan Müller
3434
#' @examples
3535
#' set.seed(100)
@@ -59,7 +59,7 @@
5959
#' vertex_labelsize = 1.5 * Matrix::rowSums(fcm_30) /
6060
#' min(Matrix::rowSums(fcm_30)))
6161
#' @export
62-
#' @seealso [fcm()]
62+
#' @seealso [fcm][quanteda::fcm()]
6363
#' @import ggplot2
6464
#' @keywords textplot
6565
textplot_network <- function(x, min_freq = 0.5, omit_isolated = TRUE,
@@ -187,7 +187,7 @@ as.network.fcm <- function(x, min_freq = 0.5, omit_isolated = TRUE, ...) {
187187

188188
#' Convert an fcm to an igraph object
189189
#'
190-
#' Convert an [fcm] object to an \pkg{igraph} graph object.
190+
#' Convert an [fcm][quanteda::fcm] object to an \pkg{igraph} graph object.
191191
#' @keywords internal
192192
#' @export
193193
as.igraph <- function(x, ...) UseMethod("as.igraph")

R/textplot_wordcloud.R

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#' Plot features as a wordcloud
22
#'
3-
#' Plot a [dfm] or [quanteda.textstats::textstat_keyness] object as a wordcloud,
4-
#' where the feature labels are plotted with their sizes proportional to their
5-
#' numerical values in the dfm. When `comparison = TRUE`, it plots comparison
6-
#' word clouds by document (or by target and reference categories in the case of
7-
#' a keyness object).
3+
#' Plot a [dfm][quanteda::dfm] or [quanteda.textstats::textstat_keyness] object
4+
#' as a wordcloud, where the feature labels are plotted with their sizes
5+
#' proportional to their numerical values in the dfm. When `comparison = TRUE`,
6+
#' it plots comparison word clouds by document (or by target and reference
7+
#' categories in the case of a keyness object).
88
#' @details
99
#' The default is to plot the word cloud of all features, summed across
1010
#' documents. To produce word cloud plots for specific document or set of
@@ -16,7 +16,8 @@
1616
#' create a dfm where the "documents" represent a subset or a grouping of
1717
#' documents by some document variable.
1818
#'
19-
#' @param x a [dfm] or [quanteda.textstats::textstat_keyness] object
19+
#' @param x a [dfm][quanteda::dfm] or [quanteda.textstats::textstat_keyness]
20+
#' object
2021
#' @param min_size size of the smallest word
2122
#' @param max_size size of the largest word
2223
#' @param min_count words with frequency below min_count will not be plotted

R/textplot_xray.R

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#' Plot the dispersion of key word(s)
22
#'
33
#' Plots a dispersion or "x-ray" plot of selected word pattern(s) across one or
4-
#' more texts. The format of the plot depends on the number of [kwic] class
5-
#' objects passed: if there is only one document, keywords are plotted one below
6-
#' the other. If there are multiple documents the documents are plotted one
7-
#' below the other, with keywords shown side-by-side. Given that this returns a
8-
#' \pkg{ggplot2} object, you can modify the plot by adding \pkg{ggplot2} layers
9-
#' (see example).
10-
#' @param ... any number of [kwic] class objects
4+
#' more texts. The format of the plot depends on the number of
5+
#' [kwic][quanteda::kwic] class objects passed: if there is only one document,
6+
#' keywords are plotted one below the other. If there are multiple documents the
7+
#' documents are plotted one below the other, with keywords shown side-by-side.
8+
#' Given that this returns a \pkg{ggplot2} object, you can modify the plot by
9+
#' adding \pkg{ggplot2} layers (see example).
10+
#' @param ... any number of [kwic][quanteda::kwic] class objects
1111
#' @param scale whether to scale the token index axis by absolute position of
1212
#' the token in the document or by relative position. Defaults are absolute
1313
#' for single document and relative for multiple documents.

cran-comments.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Submission notes
22

3-
Fixes NOTEs warned about by CRAN on 22-Jan-2024.
3+
Fixes problems from 0.94.4 that led to the package being archived, because the authors were either in the process of moving countries and taking on a new job, on summer holidays, or frantically trying to fix UBSAN problems in the main **quanteda** package.
44

55
# Checks
66

77
## Test environments
88

9-
* local macOS 14.2.1, R 4.2.3
10-
* Ubuntu 22.04 LTS, R 4.2.3
9+
* local macOS 14.4.1, R 4.4.1, and via devtools::check_mac_release()
10+
* Ubuntu 22.04 LTS, R 4.4.1
1111
* Windows release via devtools::check_win_release()
1212
* Windows devel via devtools::check_win_devel()
1313

man/as.igraph.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/textplot_network.Rd

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/textplot_wordcloud.Rd

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/textplot_xray.Rd

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/wordcloud.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/wordcloud_comparison.Rd

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Makevars

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/Makevars.win

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/wordcloud.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ using namespace Rcpp;
1010
bool qatd_cpp_is_overlap(SEXP x1_, SEXP y1_, SEXP w1_, SEXP h1_, SEXP boxe_) {
1111

1212
double x1 = as<double>(x1_);
13-
double y1 =as<double>(y1_);
13+
double y1 = as<double>(y1_);
1414
double sw1 = as<double>(w1_);
1515
double sh1 = as<double>(h1_);
1616
Rcpp::List boxes(boxe_);

0 commit comments

Comments
 (0)