Skip to content

Commit

Permalink
Merge branch 'release/2.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
adamblake committed May 4, 2021
2 parents fdd9c3e + e2d279e commit dce65c8
Show file tree
Hide file tree
Showing 98 changed files with 4,688 additions and 1,152 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ cache_test_data
^\.travis\.yml$
^codecov\.yml$
^\.github$
^\.lintr$
^data-raw$
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
# NOTE: This workflow is overkill for most R packages
# check-standard.yaml is likely a better choice
# usethis::use_github_action("check-standard") will install it.
#
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
push:
branches:
- main
- master
- develop
- release/*
pull_request:
branches:
- main
- master
- develop
- release/*

name: R-CMD-check

Expand All @@ -26,12 +23,10 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: '3.6'}
- {os: ubuntu-16.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", http-user-agent: "R/4.0.0 (ubuntu-16.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
- {os: macOS-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
Expand All @@ -44,7 +39,6 @@ jobs:
- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}

- uses: r-lib/actions/setup-pandoc@v1

Expand All @@ -55,7 +49,7 @@ jobs:
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
- name: Restore R package cache
if: runner.os != 'Windows'
uses: actions/cache@v2
with:
Expand All @@ -69,32 +63,22 @@ jobs:
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "16.04"))')
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main

name: test-coverage

Expand Down
6 changes: 6 additions & 0 deletions .lintr
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
linters: with_defaults(
line_length_linter(100),
object_name_linter = NULL,
object_length_linter(50)
)

51 changes: 36 additions & 15 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
Package: supernova
Type: Package
Title: Judd, McClelland, & Ryan Formatting for ANOVA Output
Version: 2.3.0
Date: 2021-01-12
Version: 2.4.0
Date: 2021-05-03
Authors@R: c(
person("Adam", "Blake", email = "[email protected]", role = "aut", comment = c(ORCID = "0000-0001-7881-8652")),
person("Jeff", "Chrabaszcz", role = "aut"),
person("Ji", "Son", email = "[email protected]", role = "aut", comment = c(ORCID = "0000-0002-4258-4791")),
person("Jim", "Stigler", email = "[email protected]", role = c("cre", "aut"), comment = c(ORCID = "0000-0001-6107-7827"))
)
person(
"Adam", "Blake",
email = "[email protected]",
role = "aut",
comment = c(ORCID = "0000-0001-7881-8652")),
person(
"Jeff", "Chrabaszcz",
role = "aut"),
person(
"Ji", "Son",
email = "[email protected]",
role = "aut",
comment = c(ORCID = "0000-0002-4258-4791")),
person(
"Jim", "Stigler",
email = "[email protected]",
role = c("cre", "aut"),
comment = c(ORCID = "0000-0001-6107-7827")))
Encoding: UTF-8
LazyData: yes
Description: Produces ANOVA tables in the format used by Judd, McClelland, and Ryan
Expand All @@ -18,18 +31,26 @@ Description: Produces ANOVA tables in the format used by Judd, McClelland, and R
License: GPL-3
Depends: R (>= 3.5.0)
Suggests:
testthat (>= 2.1.0),
covr,
tibble,
tidyr,
car,
lme4
covr,
lintr,
lme4,
testthat (>= 2.1.0),
vdiffr,
tidyr
Imports:
rlang,
ggplot2,
tibble,
cli,
magrittr,
vctrs,
purrr,
rlang,
stringr,
purrr
vctrs,
pillar,
methods
RoxygenNote: 7.1.1
URL: https://github.com/UCLATALL/supernova
BugReports: https://github.com/UCLATALL/supernova/issues
Roxygen: list(markdown = TRUE)
Config/testthat/edition: 3
49 changes: 49 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,27 +1,76 @@
# Generated by roxygen2: do not edit by hand

S3method(autoplot,pairwise)
S3method(format,supernova_number)
S3method(generate_models,formula)
S3method(generate_models,lm)
S3method(listwise_delete,data.frame)
S3method(listwise_delete,lm)
S3method(obj_print_header,supernova_number)
S3method(plot,pairwise)
S3method(print,comparison_models)
S3method(print,pairwise)
S3method(print,supernova)
S3method(scale_type,supernova_number)
S3method(supernova,lm)
S3method(supernova,lmerMod)
S3method(tbl_sum,pairwise_tbl)
S3method(variables,formula)
S3method(variables,lm)
S3method(variables,lmerMod)
S3method(variables,supernova)
S3method(vec_arith,supernova_number)
S3method(vec_arith.numeric,supernova_number)
S3method(vec_arith.supernova_number,MISSING)
S3method(vec_arith.supernova_number,default)
S3method(vec_arith.supernova_number,numeric)
S3method(vec_arith.supernova_number,supernova_number)
S3method(vec_cast,character.supernova_number)
S3method(vec_cast,double.supernova_number)
S3method(vec_cast,supernova_number.character)
S3method(vec_cast,supernova_number.double)
S3method(vec_cast,supernova_number.supernova_number)
S3method(vec_ptype2,character.supernova_number)
S3method(vec_ptype2,double.supernova_number)
S3method(vec_ptype2,supernova_number.character)
S3method(vec_ptype2,supernova_number.double)
S3method(vec_ptype2,supernova_number.supernova_number)
S3method(vec_ptype_abbr,supernova_number)
export("%>%")
export(PRE)
export(SSE)
export(SSM)
export(SSR)
export(as_number)
export(b0)
export(b1)
export(drop_term)
export(equation)
export(f)
export(fVal)
export(generate_models)
export(is_number)
export(listwise_delete)
export(number)
export(pairwise)
export(pairwise_bonferroni)
export(pairwise_t)
export(pairwise_tukey)
export(pre)
export(sse)
export(ssm)
export(ssr)
export(superanova)
export(supernova)
export(variables)
export(vec_arith.supernova_number)
import(vctrs)
importFrom(ggplot2,"%+%")
importFrom(ggplot2,autoplot)
importFrom(ggplot2,scale_type)
importFrom(magrittr,"%>%")
importFrom(pillar,tbl_sum)
importFrom(rlang,.data)
importFrom(stats,anova)
importFrom(stats,as.formula)
importFrom(stats,drop1)
Expand Down
14 changes: 14 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# supernova 2.4.0

## New features

There are four new pairwise comparisons functions:

- `pairwise()`
- `pairwise_t()`
- `pairwise_bonferroni()`
- `pairwise_tukey()`

Each of these determines all the pairwise comparisons that can be made for a model (fit by `lm()`) and then computes the comparisons. For `pairwise_t()` no correction is made for multiple comparisons, but for the others, the named correction is made. These corrections can also be specified as arguments to the `pairwise()` wrapper function. Each function produces output that has customized printing, supports most (if not all) normal data frame actions, and a plotting function that graphs the mean differences and their confidence intervals.


# supernova 2.3.0

* Dependency on `lme4` is moved to Suggests. Models implementing `lmerMod` are handled via `supernova.lmerMod` and `variables.lmerMod` but use of the `lme4` package is limited to tests.
Expand Down
96 changes: 96 additions & 0 deletions R/data.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#' Data from introductory statistics students at a university.
#'
#' Students at a university taking an introductory statistics course were asked to complete this
#' survey as part of their homework.
#'
#' @format A data frame with 157 observations on the following 16 variables:
#' \describe{
#' \item{Sex}{Sex of participant.}
#' \item{RaceEthnic}{Racial or ethnic background.}
#' \item{FamilyMembers}{Members of immediate family (excluding self).}
#' \item{SSLast}{Last digit of social security number (NA if no SSN).}
#' \item{Year}{Year in school: 1=First, 2=Second, 3=Third, 4=Fourth, 5=Other}
#' \item{Job}{Current employment status: 0=not working, 1=part-time job, 2=full-time job}
#' \item{MathAnxious}{Agreement with this statement "In general I tend to feel very anxious about mathematics": 2=Strongly Agree, 1=Agree, 0=Neither Agree nor Disagree, -1=Disagree, -2=Strongly Disagree}
#' \item{Interest}{Interest in statistics and the course: 2=very interested in course and statistics, 1=somewhat interested, 0=no interest, -1=dread the course.}
#' \item{GradePredict}{Prediction for final grade in the course from the university's grade points per unit: 4.0=A, 3.7=A-, 3.3=B+, 3.0=B, 2.7=B-, 2.3=C+, 2.0=C, 1.7=C-, 1.3=Below C- }
#' \item{Thumb}{Length in mm from tip of thumb to the crease between the thumb and palm.}
#' \item{Index}{Length in mm from tip of index finger to the crease between the index finger and palm.}
#' \item{Middle}{Length in mm from tip of middle finger to the crease between the middle finger and palm.}
#' \item{Ring}{Length in mm from tip of ring finger to the crease between the middle finger and palm.}
#' \item{Pinkie}{Length in mm from tip of pinkie finger to the crease between the pinkie finger and palm }
#' \item{Height}{Height in inches.}
#' \item{Weight}{Weight in pounds.}
#' }
"Fingers"


#' Tables data
#'
#' Data about tips collected from an experiment with 44 tables at a restaurant.
#'
#' @format A data frame with 44 observations on the following 2 variables.
#' \describe{
#' \item{TableID}{A number assigned to each table.}
#' \item{Tip}{How much the tip was.}
#' }
"Tables"


#' Servers data
#'
#' Data about tips collected from an experiment with 44 servers at a restaurant.
#'
#' Note: these data will be removed in future versions in favor of \code{\link{Tables}}.
#'
#' @format A data frame with 44 observations on the following 2 variables.
#' \describe{
#' \item{ServerID}{A number assigned to each server.}
#' \item{Tip}{How much the tip was.}
#' }
"Servers"


#' Data from an experiment about smiley faces and tips
#'
#' Tables were randomly assigned to receive checks that either included or did not include a drawing
#' of a smiley face. Data was collected from 44 tables in an effort to examine whether the added
#' smiley face would cause more generous tipping.
#'
#' @format A data frame with 44 observations on the following 3 variables.
#' \describe{
#' \item{TableID}{A number assigned to each table.}
#' \item{Tip}{How much the tip was.}
#' \item{Condition}{Which experimental condition the table was randomly assigned to.}
#' }
"TipExperiment"


#' Students at a university were asked to enter a random number between 1-20 into a survey.
#'
#' Students at a university taking an introductory statistics course were asked to complete this
#' survey as part of their homework.
#'
#' @format A data frame with 211 observations on the following 1 variable:
#' \describe{
#' \item{Any1_20}{The random number between 1 and 20 that a student thought of.}
#' }
"Survey"


#' Teacher effectiveness data
#'
#' These are hypothetical data for a small study comparing the effectiveness of three different
#' teachers. Each teacher was randomly assigned a group of 35 high school students and asked to
#' teach a 5-day unit on a new science topic for which none of the students had any prior knowledge.
#' All three teachers used the same curriculum materials and lesson plans, and student learning was
#' assessed using a common 30-item test at the end of the unit. The research question was: Were some
#' teachers more effective than others? Did teachers differ in the amount of learning they were able
#' to produce in their students?
#'
#' @format A data frame with 105 observations on the following 2 variables:
#' \describe{
#' \item{teacher}{coded as A, B, or C}
#' \item{outcome}{each student's score on the outcome test}
#' }
"class_data"
Loading

0 comments on commit dce65c8

Please sign in to comment.