Skip to content

Commit

Permalink
update README, cran-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
friendly committed Apr 15, 2023
1 parent bbd77f3 commit 08e1fc4
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 36 deletions.
17 changes: 13 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,19 @@ Authors@R: c(
email="[email protected]",
comment = c(ORCID = "0000-0002-3237-0941")),
person(given = "Heather", family = "Turner", role="ctb"),
person(given = "David", family = "Meyer", role="ctb"),
person(given = "Achim", family = "Zeileis", role="ctb"),
person(given = "Duncan", family = "Murdoch", role="ctb"),
person(given = "David", family = "Firth", role="ctb"),
person(given = "David",
family = "Meyer",
role="ctb"),
person(given = "Achim",
family = "Zeileis",
role="ctb",
comment = c(ORCID = "0000-0003-0918-3766")),
person(given = "Duncan",
family = "Murdoch",
role="ctb"),
person(given = "David",
family = "Firth",
role="ctb"),
person(given = "Matt", family = "Kumar", role="ctb"),
person(given = "Shuguang", family = "Sun", role="ctb")
)
Expand Down
27 changes: 17 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ library(vcdExtra)
# vcdExtra <img src="man/figures/logo.png" style="float:right; height:200px;" />
## Extensions and additions to vcd: Visualizing Categorical Data

Version 0.8-3
Version 0.8-4

This package provides additional data sets, documentation, and many
functions designed to extend the [vcd](https://CRAN.R-project.org/package=vcd) package for *Visualizing Categorical Data*
Expand Down Expand Up @@ -66,10 +66,13 @@ generalized linear models using
`stats::glm()` and the related, generalized _nonlinear_ models fitted
with `gnm()` in the [gnm](https://CRAN.R-project.org/package=gnm) package.

A related purpose is to fill in some holes in the analysis of
A related purpose was to fill in some holes in the analysis of
categorical data in R, not provided in base R, [vcd](https://CRAN.R-project.org/package=vcd),
or other commonly used packages.

#### Highlights

##### mosaic plot extensions
* The method `mosaic.glm()`
extends the `mosaic.loglm()` method in the vcd
package to this wider class of models, e.g., models for ordinal factors, which can't
Expand All @@ -82,6 +85,7 @@ including models for square tables and models with multiplicative associations (
introduces a 3D generalization of mosaic displays using the
[rgl](https://CRAN.R-project.org/package=rgl) package.

##### model extensions
* A new class, `glmlist`, is introduced for working with
collections of glm objects, e.g., `Kway()` for fitting
all K-way models from a basic marginal model, and `LRstats()`
Expand All @@ -100,9 +104,11 @@ specification of terms in model formulas using
`gnm::Diag()`,
`gnm::Topo(),` etc. in the [gnm](https://CRAN.R-project.org/package=gnm) package.

In addition, there are:
#### Other additions

* many new data sets; use `datasets("vcdExtra")` to see a list with titles and descriptions
* many new data sets; use `datasets("vcdExtra")` to see a list with titles and descriptions.
The vignette, `vignette("datasets", package="vcdExtra")` provides a classification of these
according to methods of analysis.

```{r vcdExtra-datasets}
vcdExtra::datasets("vcdExtra")[,1]
Expand All @@ -111,7 +117,7 @@ vcdExtra::datasets("vcdExtra")[,1]
* a [collection of tutorial vignettes](https://cran.r-project.org/web/packages/vcdExtra/vignettes/). In the installed package, they can be viewed using `browseVignettes(package = "vcdExtra")`;

```{r vignettes}
tools::getVignetteInfo("vcdExtra")[,c("File", "Title")]
tools::getVignetteInfo("vcdExtra")[,c("File", "Title")] |> knitr::kable()
```

* a few useful utility functions for manipulating categorical data sets and working with models for
Expand All @@ -120,6 +126,10 @@ categorical data.

## Examples

These `README` examples simply provide illustrations of using some of the package functions in the
context of loglinear models for frequency tables fit using `glm()`, including
models for _structured associations_ taking ordinality into account.

The dataset `Mental` is a data frame frequency table representing the cross-classification of mental health status (`mental`) of 1660 young New York residents by their parents' socioeconomic status (`ses`).
Both are _ordered_ factors.

Expand All @@ -132,14 +142,11 @@ str(Mental)
```


These examples illustrate fitting loglinear models using `glm()` and models for _structured associations_ taking
ordinality into account.


#### Independence model
Fit the independence model, `Freq ~ mental + ses`, using `glm(..., family = poisson)`
This model is equivalent to the `chisq.test(Mental)` for general association; it
does not take ordinality into account.
does not take ordinality into account. `LRstats()` provides a compact summary of
fit statistics for one or more models.
```{r ex-mental2}
indep <- glm(Freq ~ mental + ses,
family = poisson, data = Mental)
Expand Down
59 changes: 40 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,15 @@ linear models using `stats::glm()` and the related, generalized
*nonlinear* models fitted with `gnm()` in the
[gnm](https://CRAN.R-project.org/package=gnm) package.

A related purpose is to fill in some holes in the analysis of
A related purpose was to fill in some holes in the analysis of
categorical data in R, not provided in base R,
[vcd](https://CRAN.R-project.org/package=vcd), or other commonly used
packages.

#### Highlights

##### mosaic plot extensions

- The method `mosaic.glm()` extends the `mosaic.loglm()` method in the
vcd package to this wider class of models, e.g., models for ordinal
factors, which can’t be handled with `MASS::loglm()`. This method also
Expand All @@ -69,6 +73,8 @@ packages.
- `mosaic3d()` introduces a 3D generalization of mosaic displays using
the [rgl](https://CRAN.R-project.org/package=rgl) package.

##### model extensions

- A new class, `glmlist`, is introduced for working with collections of
glm objects, e.g., `Kway()` for fitting all K-way models from a basic
marginal model, and `LRstats()` for brief statistical summaries of
Expand All @@ -87,24 +93,27 @@ packages.
`gnm::Diag()`, `gnm::Topo(),` etc. in the
[gnm](https://CRAN.R-project.org/package=gnm) package.

In addition, there are:
#### Other additions

- many new data sets; use `datasets("vcdExtra")` to see a list with
titles and descriptions
titles and descriptions. The vignette,
`vignette("datasets", package="vcdExtra")` provides a classification
of these according to methods of analysis.

``` r
vcdExtra::datasets("vcdExtra")[,1]
## [1] "Abortion" "Accident" "AirCrash" "Alligator"
## [5] "Bartlett" "Burt" "Caesar" "Cancer"
## [9] "Cormorants" "CyclingDeaths" "DaytonSurvey" "Depends"
## [13] "Detergent" "Donner" "Draft1970" "Draft1970table"
## [17] "Dyke" "Fungicide" "GSS" "Geissler"
## [21] "Gilby" "Glass" "HairEyePlace" "Hauser79"
## [25] "Heart" "Heckman" "HospVisits" "HouseTasks"
## [29] "Hoyt" "ICU" "JobSat" "Mammograms"
## [33] "Mental" "Mice" "Mobility" "PhdPubs"
## [37] "ShakeWords" "TV" "Titanicp" "Toxaemia"
## [41] "Vietnam" "Vote1980" "WorkerSat" "Yamaguchi87"
## [5] "Asbestos" "Bartlett" "Burt" "Caesar"
## [9] "Cancer" "Cormorants" "CyclingDeaths" "DaytonSurvey"
## [13] "Depends" "Detergent" "Donner" "Draft1970"
## [17] "Draft1970table" "Dyke" "Fungicide" "GSS"
## [21] "Geissler" "Gilby" "Glass" "HairEyePlace"
## [25] "Hauser79" "Heart" "Heckman" "HospVisits"
## [29] "HouseTasks" "Hoyt" "ICU" "JobSat"
## [33] "Mammograms" "Mental" "Mice" "Mobility"
## [37] "PhdPubs" "ShakeWords" "TV" "Titanicp"
## [41] "Toxaemia" "Vietnam" "Vote1980" "WorkerSat"
## [45] "Yamaguchi87"
```

- a [collection of tutorial
Expand All @@ -113,15 +122,29 @@ vcdExtra::datasets("vcdExtra")[,1]
`browseVignettes(package = "vcdExtra")`;

``` r
tools::getVignetteInfo("vcdExtra")[,c("File", "Title")]
## File Title
tools::getVignetteInfo("vcdExtra")[,c("File", "Title")] |> knitr::kable()
```

| File | Title |
|:-----------------|:-------------------------------------------|
| continuous.Rmd | Continuous predictors |
| creating.Rmd | Creating and manipulating frequency tables |
| datasets.Rmd | Datasets for categorical data analysis |
| demo-housing.Rmd | Demo - Housing Data |
| loglinear.Rmd | Loglinear Models |
| mosaics.Rmd | Mosaic plots |
| tests.Rmd | Tests of Independence |

- a few useful utility functions for manipulating categorical data sets
and working with models for categorical data.

## Examples

These `README` examples simply provide illustrations of using some of
the package functions in the context of loglinear models for frequency
tables fit using `glm()`, including models for *structured associations*
taking ordinality into account.

The dataset `Mental` is a data frame frequency table representing the
cross-classification of mental health status (`mental`) of 1660 young
New York residents by their parents’ socioeconomic status (`ses`). Both
Expand All @@ -147,15 +170,13 @@ str(Mental)
## 6 21 71 54 71
```

These examples illustrate fitting loglinear models using `glm()` and
models for *structured associations* taking ordinality into account.

#### Independence model

Fit the independence model, `Freq ~ mental + ses`, using
`glm(..., family = poisson)` This model is equivalent to the
`chisq.test(Mental)` for general association; it does not take
ordinality into account.
ordinality into account. `LRstats()` provides a compact summary of fit
statistics for one or more models.

``` r
indep <- glm(Freq ~ mental + ses,
Expand Down
9 changes: 6 additions & 3 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Test environments
* local Windows 10, R version 4.2.2 (2022-10-31 ucrt)
* win-builder R version 4.2.2 (2022-10-31 ucrt)
* win-builder R 4.3.0 beta (2023-04-12 r84240 ucrt)
* R Under development (unstable) (2023-03-03 r83933 ucrt)
* Rhub Ubuntu Linux 20.04.1 LTS, R-release, GCC
* Rhub Fedora Linux, R-devel, clang, gfortran
Expand All @@ -10,21 +10,24 @@ There are no ERRORs or WARNINGs or NOTEs

## Version 0.8-4 (2023-04-12)

This is first a maintenance release to correct an error users encounter to load
the package. It also extends/expands on vignettes

- Imports: tidyr must depend on (>= 1.3.0) for one use in a vignette.
- Enhanced the vignette, "Creating and manipulating frequency tables", `vignettes/creating.Rmd`
- Created a new vignete, "Mobility tables"

# reverse dependencies

> devtools::revdep()
[1] "aplore3" "catdata" "gnm" "iarm" "jmv"
[1] "aplore3" "catdata" "gnm" "iarm" "jmv" "reappraised"
> revdepcheck::revdep_check(num_workers = 4)
*Wow, no problems at all. :)*

## revdepcheck results

We checked 5 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
We checked 6 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
Expand Down

0 comments on commit 08e1fc4

Please sign in to comment.