Skip to content

Commit

Permalink
Merge branch 'master' into devel
Browse files Browse the repository at this point in the history
  • Loading branch information
MarHai authored May 7, 2024
2 parents ff47bb9 + ced4596 commit 2f8b53e
Show file tree
Hide file tree
Showing 21 changed files with 197 additions and 85 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@
^revdep$
^index\.Rmd$
^index\.md$
^CRAN-SUBMISSION$
3 changes: 3 additions & 0 deletions CRAN-SUBMISSION
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Version: 0.4.1
Date: 2024-02-22 08:43:54 UTC
SHA: 2faf7dcc409fc4124ebf75498ad1832c6bd5c7f4
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: tidycomm
Title: Data Modification and Analysis for Communication Research
Version: 0.4.0
Version: 0.4.1
Authors@R: c(
person("Julian", "Unkel", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-9568-7041")),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# tidycomm 0.4.0
# tidycomm 0.4.1

# tidycomm 0.3.0

Expand Down
6 changes: 3 additions & 3 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Worlds of Journalism sample data
#'
#' A subset of data from the [Worlds of Journalism](https://www.worldsofjournalism.org/)
#' A subset of data from the [Worlds of Journalism](https://worldsofjournalism.org/)
#' 2012-16 study containing survey data of 1,200 journalists from five European
#' countries.
#'
Expand Down Expand Up @@ -38,7 +38,7 @@
#' \item{trust_politicians}{Trust placed in politicians in general,
#' scale from 1 (*no trust at all*) to 5 (*complete trust*)}
#' }
#' @source \url{https://worldsofjournalism.org/data/data-and-key-tables-2012-2016}
#' @source \samp{https://worldsofjournalism.org/data/data-and-key-tables-2012-2016}
"WoJ"

#' Facebook posts reliability test
Expand Down Expand Up @@ -84,7 +84,7 @@
#' Kümpel, A. S., & Unkel, J. (2020). Negativity wins at last: How presentation
#' order and valence of user comments affect perceptions of journalistic quality.
#' Journal of Media Psychology: Theories, Methods, and Applications, 32(2), 89–99.
#' \url{https://doi.org/10.1027/1864-1105/a000261}
#' \doi{10.1027/1864-1105/a000261}
#'
#' @format A data frame of 630 observations and 15 variables:
#' \describe{
Expand Down
5 changes: 3 additions & 2 deletions R/describe.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
#' - Range: difference between Min and Max
#' - CI_95_LL: \eqn{M - Q(0.975) \times \frac{SD}{\sqrt{N}}} where \eqn{Q(0.975)} denotes Student t's [stats::quantile] function with a probability of \eqn{0.975} and \eqn{N-1} degrees of freedom
#' - CI_95_UL: \eqn{M + Q(0.975) \times \frac{SD}{\sqrt{N}}} where \eqn{Q(0.975)} denotes Student t's [stats::quantile] function with a probability of \eqn{0.975} and \eqn{N-1} degrees of freedom
#' - Skewness: traditional Fisher-Pearson coefficient of skewness of valid cases as per \eqn{\frac{\frac{1}{N} \sum\limits_{i=1}^N (x_{i}-\overline{x})^3}{[\frac{1}{N}\sum\limits_{i=1}^N (x_{i}-\overline{x})^2]^{3/2}}} where \eqn{\overline{x}} denotes \eqn{M}, following [Doane & Seward, 2011, p. 6, 1a](\doi{10.1080/10691898.2011.11889611})
#' - Kurtosis: empirical sample kurtosis (i.e., standardized fourth population moment about the mean) as per \eqn{\frac{\sum (x-\overline{x})^4 / N}{(\sum (x-\overline{x})^2 / N)^2}}, following [DeCarlo, 1997, p. 292, b2](\doi{10.1037/1082-989X.2.3.292})
#' - Skewness: traditional Fisher-Pearson coefficient of skewness of valid cases as per \eqn{\frac{\frac{1}{N} \sum\limits_{i=1}^N (x_{i}-\overline{x})^3}{[\frac{1}{N}\sum\limits_{i=1}^N (x_{i}-\overline{x})^2]^{3/2}}}
#' where \eqn{\overline{x}} denotes \eqn{M}, following Doane & Seward (2011, p. 6, 1a). See DOI \doi{10.1080/10691898.2011.11889611}.
#' - Kurtosis: empirical sample kurtosis (i.e., standardized fourth population moment about the mean) as per \eqn{\frac{\sum (x-\overline{x})^4 / N}{(\sum (x-\overline{x})^2 / N)^2}}, following DeCarlo (1997, p. 292, b2). See DOI \doi{10.1037/1082-989X.2.3.292}.
#'
#' @param data a [tibble][tibble::tibble-package] or a [tdcmm] model
#' @param ... Variables to describe (column names). Leave empty to describe all
Expand Down
2 changes: 1 addition & 1 deletion R/scaling.R
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ recode_cat_scale <- function(data, ..., assign = NULL,
#' variables based on a specified lower end, upper end, and intermediate breaks.
#' The intervals created include the right endpoint of the interval. For example,
#' breaks = c(2, 3) with lower_end = 1 and upper_end = 5 creates intervals from
#' 1 to 2, >2 to 3, and >3 to 5. If the lower or upper ends are not provided,
#' 1 to <= 2, >2 to <= 3, and >3 to <= 5. If the lower or upper ends are not provided,
#' the function defaults to the minimum and maximum values of the data and issues
#' a warning. This default behavior is prone to errors, however, because a scale may not
#' include its actual lower and upper ends which might in turn affect the recoding
Expand Down
3 changes: 3 additions & 0 deletions R/tdcmm_class.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ model.tdcmm <- function(x, ...) {
#' @family visualize
#'
#' @examples
#' \dontrun{
#' WoJ %>%
#' describe() %>%
#' visualize()
Expand All @@ -215,6 +216,7 @@ model.tdcmm <- function(x, ...) {
#' WoJ %>%
#' crosstab(reach, employment) %>%
#' visualize()
#'
#' fbposts %>%
#' crosstab(coder_id, type, percentages = TRUE) %>%
#' visualize()
Expand Down Expand Up @@ -263,6 +265,7 @@ model.tdcmm <- function(x, ...) {
#' describe_cat() %>%
#' visualize() +
#' ggplot2::scale_fill_grey()
#'}
#'
#' @export
visualize <- function(x, ..., .design = design_lmu()) {
Expand Down
4 changes: 3 additions & 1 deletion R/unianova.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
#'
#' @examples
#' WoJ %>% unianova(employment, autonomy_selection, autonomy_emphasis)
#' WoJ %>% unianova(employment)
#' WoJ %>% unianova(employment, descriptives = TRUE, post_hoc = TRUE)
#' \dontrun{
#' WoJ %>% unianova(employment)
#' }
#'
#' @export
unianova <- function(data, group_var, ..., descriptives = FALSE, post_hoc = FALSE) {
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ format_value <- function(x, d) trimws(format(round(x, d), nsmall = d))

#' Helper function for labelling purposes
#'
#' @param numeric share between 0 and 1
#' @param x share between 0 and 1
#'
#' @return a string with formatted % (rounded and suffixed)
#'
Expand Down
30 changes: 29 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
This update raises version to 0.4.0 since it introduces new tdcmm/tibble returns and new functions, such as partial correlation, linear regression, one-sample t-test, scale transformations, percentiles, visualizations, and additional datasets (snscomments and incvlcomments).
## Resubmission
This is a resubmission. In this version we have:

* Corrected the DOI links in the documentation. They are now properly formatted as standalone \doi{} commands without being encapsulated within any other markup, as per the CRAN guidelines.

## About
This update elevates the version directly to 0.4.1 as it introduces significant enhancements including new tdcmm/tibble returns and functions such as partial correlation, linear regression, one-sample t-test, scale transformations, percentiles, visualizations, and additional datasets (snscomments and incvlcomments). Additionally, we have applied a minor patch to encase the 'visualize()' examples within 'dontrun()' to reduce the elapsed time during the compilation of these examples.

## Test environments

Expand All @@ -8,6 +14,28 @@ This update raises version to 0.4.0 since it introduces new tdcmm/tibble return
* Ubuntu 20.04 (on GitHub Actions), devel
* Windows latest (on GitHub Actions), release

There were 3 NOTES identified when testing the package on Windows using R-hub, but all are referenced in the open issues of the R-hub package and thus appear to be unrelated to this package:

> checking for non-standard things in the check directory ... NOTE
Found the following files/directories:
''NULL''

> checking for detritus in the temp directory ... NOTE
Found the following files/directories:
'lastMiKTeXException'

> checking HTML version of manual ... NOTE
Skipping checking math rendering: package 'V8' unavailable


## R CMD check results

0 errors | 0 warnings | 0 note


## revdepcheck results

We checked 0 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.

* We saw 0 new problems
* We failed to check 0 packages
2 changes: 1 addition & 1 deletion man/WoJ.Rd

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

2 changes: 1 addition & 1 deletion man/categorize_scale.Rd

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

5 changes: 3 additions & 2 deletions man/describe.Rd

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

2 changes: 1 addition & 1 deletion man/percentage_labeller.Rd

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

2 changes: 1 addition & 1 deletion man/snscomments.Rd

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

4 changes: 3 additions & 1 deletion man/unianova.Rd

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

3 changes: 3 additions & 0 deletions man/visualize.Rd

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

1 change: 1 addition & 0 deletions revdep/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ checks.noindex
library.noindex
data.sqlite
*.html
cloud.noindex
Loading

0 comments on commit 2f8b53e

Please sign in to comment.