From 18a47efd438898310350cb4f72f96c47526bb632 Mon Sep 17 00:00:00 2001 From: Kohei Watanabe Date: Thu, 9 Jan 2025 09:12:42 +0900 Subject: [PATCH] Fix MAN --- R/textstat.R | 4 ++-- R/utils.R | 9 +++++---- man/diagnosys.Rd | 4 ++-- man/smooth_lss.Rd | 4 ++-- man/textstat_context.Rd | 4 ++-- 5 files changed, 13 insertions(+), 12 deletions(-) diff --git a/R/textstat.R b/R/textstat.R index a623b5d..97c06df 100644 --- a/R/textstat.R +++ b/R/textstat.R @@ -13,12 +13,12 @@ #' considered as collocations. #' @param remove_pattern if `TRUE`, keywords do not contain target words. #' @inheritParams quanteda::tokens_ngrams -#' @param ... additional arguments passed to [textstat_keyness()]. +#' @param ... additional arguments passed to [quanteda.textstats::textstat_keyness()]. #' @importFrom quanteda.textstats textstat_keyness #' @importFrom quanteda is.tokens tokens_remove tokens_select tokens_ngrams dfm #' dfm_trim dfm_match featnames as.dfm dfm_remove #' @export -#' @seealso [tokens_select()] and [textstat_keyness()] +#' @seealso [quanteda.textstats::textstat_keyness()] textstat_context <- function(x, pattern, valuetype = c("glob", "regex", "fixed"), case_insensitive = TRUE, window = 10, min_count = 10, remove_pattern = TRUE, n = 1, skip = 0, ...) { diff --git a/R/utils.R b/R/utils.R index e487664..22c0d08 100644 --- a/R/utils.R +++ b/R/utils.R @@ -1,6 +1,6 @@ #' Identify noisy documents in a corpus -#' @param x character or [corpus] object whose texts will be diagnosed. -#' @param ... extra arguments passed to `tokens`. +#' @param x character or [quanteda::corpus()] object whose texts will be diagnosed. +#' @param ... extra arguments passed to [quanteda::tokens()]. #' @keywords internal #' @export #' @importFrom quanteda corpus tokens texts @@ -17,7 +17,7 @@ diagnosys.character <- function(x, ...) { #' @importFrom quanteda dictionary ntoken dfm convert dfm_lookup diagnosys.corpus <- function(x, ...) { - .Deprecated("quanteda.textstats::textstat_summary") + .Deprecated("quanteda.textstats::textstat_summary()") dict <- dictionary(list( "number" = "\\p{N}", "punct" = "\\p{P}", @@ -126,8 +126,9 @@ seedwords <- function(type) { } -#' Smooth predicted polarity scores by local polynomial regression +#' Smooth predicted polarity scores #' +#' Smooth predicted polarity scores by local polynomial regression. #' @param x a [data.frame] containing polarity scores and dates. #' @param lss_var the name of the column in `x` for polarity scores. #' @param date_var the name of the column in `x` for dates. diff --git a/man/diagnosys.Rd b/man/diagnosys.Rd index b58d627..d934878 100644 --- a/man/diagnosys.Rd +++ b/man/diagnosys.Rd @@ -7,9 +7,9 @@ diagnosys(x, ...) } \arguments{ -\item{x}{character or \link{corpus} object whose texts will be diagnosed.} +\item{x}{character or \code{\link[quanteda:corpus]{quanteda::corpus()}} object whose texts will be diagnosed.} -\item{...}{extra arguments passed to \code{tokens}.} +\item{...}{extra arguments passed to \code{\link[quanteda:tokens]{quanteda::tokens()}}.} } \description{ Identify noisy documents in a corpus diff --git a/man/smooth_lss.Rd b/man/smooth_lss.Rd index ec05849..1419f8e 100644 --- a/man/smooth_lss.Rd +++ b/man/smooth_lss.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/utils.R \name{smooth_lss} \alias{smooth_lss} -\title{Smooth predicted polarity scores by local polynomial regression} +\title{Smooth predicted polarity scores} \usage{ smooth_lss( x, @@ -36,7 +36,7 @@ passed to \link{seq.Date}.} \item{...}{additional arguments passed to the smoothing function.} } \description{ -Smooth predicted polarity scores by local polynomial regression +Smooth predicted polarity scores by local polynomial regression. } \details{ Smoothing is performed using \code{\link[stats:loess]{stats::loess()}} or \code{\link[locfit:locfit]{locfit::locfit()}}. diff --git a/man/textstat_context.Rd b/man/textstat_context.Rd index e32e04d..d28c6b4 100644 --- a/man/textstat_context.Rd +++ b/man/textstat_context.Rd @@ -62,7 +62,7 @@ construct the \eqn{n}-gram. Thus a "4-skip-n-gram" defined as \code{skip = 0:4} skips (where 0 skips are typical n-grams formed from adjacent words). See Guthrie et al (2006).} -\item{...}{additional arguments passed to \code{\link[=textstat_keyness]{textstat_keyness()}}.} +\item{...}{additional arguments passed to \code{\link[quanteda.textstats:textstat_keyness]{quanteda.textstats::textstat_keyness()}}.} \item{p}{threshold for statistical significance of collocations.} } @@ -70,5 +70,5 @@ Guthrie et al (2006).} Identify context words using user-provided patterns } \seealso{ -\code{\link[=tokens_select]{tokens_select()}} and \code{\link[=textstat_keyness]{textstat_keyness()}} +\code{\link[quanteda.textstats:textstat_keyness]{quanteda.textstats::textstat_keyness()}} }