Learn R Programming

⚠️There's a newer version (0.4.1) of this package.Take me there.

tidycomm

Tidycomm provides convenience functions for common tasks in communication research. All functions follow the style and syntax of the tidyverse.

Currently, tidycomm includes functions for various methods of univariate and bivariate data description and analysis, data modification, and intercoder reliability tests.

Installation

Install the most recent development version of tidycomm with:

devtools::install_github("joon-e/tidycomm")

Usage

library(tidycomm)

tidycomm functions follow the style and syntax of the tidyverse functions:

  • they always assume a tibble as their first argument
  • they will always return a tibble as well, so they can be easily integrated into pipes
  • data variables (tibble columns) are passed to function calls directly as symbols
WoJ %>% # Worlds of Journalism sample data
  describe(autonomy_selection, autonomy_emphasis)
#> # A tibble: 2 x 13
#>   Variable     N Missing     M    SD   Min   Q25   Mdn   Q75   Max Range
#>   <chr>    <int>   <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 autonom~  1200       3  3.88 0.803     1     4     4     4     5     4
#> 2 autonom~  1200       5  4.08 0.793     1     4     4     5     5     4
#> # ... with 2 more variables: Skewness <dbl>, Kurtosis <dbl>

Most functions will automatically use all relevant variables in the data if no variables are specified in the function call. For example, to compute descriptive statistics for all numeric variables in the data, just call describe() without further arguments:

WoJ %>% 
  describe()
#> # A tibble: 11 x 13
#>    Variable     N Missing     M     SD   Min   Q25   Mdn   Q75   Max Range
#>    <chr>    <int>   <int> <dbl>  <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#>  1 autonom~  1200       3  3.88  0.803     1  4        4     4     5     4
#>  2 autonom~  1200       5  4.08  0.793     1  4        4     5     5     4
#>  3 ethics_1  1200       0  1.63  0.892     1  1        1     2     5     4
#>  4 ethics_2  1200       0  3.21  1.26      1  2        4     4     5     4
#>  5 ethics_3  1200       0  2.39  1.13      1  2        2     3     5     4
#>  6 ethics_4  1200       0  2.58  1.25      1  1.75     2     4     5     4
#>  7 work_ex~  1200      13 17.8  10.9       1  8       17    25    53    52
#>  8 trust_p~  1200       0  3.05  0.811     1  3        3     4     5     4
#>  9 trust_g~  1200       0  2.82  0.854     1  2        3     3     5     4
#> 10 trust_p~  1200       0  2.42  0.736     1  2        2     3     4     3
#> 11 trust_p~  1200       0  2.52  0.712     1  2        3     3     4     3
#> # ... with 2 more variables: Skewness <dbl>, Kurtosis <dbl>

Likewise, compute intercoder reliability tests for all variables by only specifying the post and coder ID variables:

fbposts %>% # Facebook post codings sample data
  test_icr(post_id, coder_id)
#> # A tibble: 5 x 8
#>   Variable n_Units n_Coders n_Categories Level Agreement Holstis_CR
#>   <chr>      <int>    <int>        <int> <chr>     <dbl>      <dbl>
#> 1 type          45        6            4 nomi~     1          1    
#> 2 n_pictu~      45        6            7 nomi~     0.822      0.930
#> 3 pop_eli~      45        6            6 nomi~     0.733      0.861
#> 4 pop_peo~      45        6            2 nomi~     0.778      0.916
#> 5 pop_oth~      45        6            4 nomi~     0.867      0.945
#> # ... with 1 more variable: Krippendorffs_Alpha <dbl>

For detailed examples, see the vignettes:

browseVignettes("tidycomm")

Copy Link

Version

Install

install.packages('tidycomm')

Monthly Downloads

845

Version

0.0.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Julian Unkel

Last Published

September 19th, 2019

Functions in tidycomm (0.0.1)

add_index

Add index
kurtosis

Kurtosis
icr_agreement

Compute simple percent agreement
kalpha_num_values

Compute Krippendorffs's Alpha numerator values
grab_vars

Keep existing variables or get all numeric variables
test_icr

Perform an intercoder reliability test
cramer_V

Compute Cramer's V
crosstab

Crosstab variables
to_correlation_matrix

Create correlation matrix
correlation_test

Compute correlation test
count_value_in_unit

Count specific value in unit
icr_kripp_alpha

Compute Krippendorff's Alpha
icr_cohens_kappa

Compute Cohen's Kappa
icr_brennan_prediger

Compute Brennan & Prediger's Kappa
values_in_unit

Count values in unit
icr_holstis_CR

Compute Holsti's reliability estimate
unianova

Compute one-way ANOVAs
fbposts

Facebook posts reliability test
get_reliability

Get reliability estimates of index variables
icr_fleiss_kappa

Compute Fleiss' Kappa
unit_coder_matrix

Generate units-coders matrix
delta_sq

Compute value of difference function
kalpha_denom

Compute Krippendorffs's Alpha denominator
describe

Describe variables
t_test

Compute t-tests
skewness

Skewness
%>%

Pipe operator
tab_frequencies

Tabulate frequencies
compute_reliability

Compute reliability
col_percs

Compute column percentages
check_equal

Check if all values in a vector are the same
WoJ

Worlds of Journalism sample data
correlate

Compute correlation coefficients
cohens_d

Compute Cohen's d
compute_aov

Compute one-way ANOVA
compute_t_test

Compute t-test
compute_icr

Compute intercoder reliability estimates for one test variable