Skip to content

Commit 4bc593b

Browse files
committed
Update README with ver info; remove docs/ from .gitignore
1 parent 9da0b84 commit 4bc593b

5 files changed

Lines changed: 82 additions & 30 deletions

File tree

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
/*.Rproj
66
Rplots.pdf
77
revdep/
8-
# pkgdown now build by github actions
9-
/docs/
108
/doc/
119
/Meta/
1210

README.Rmd

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ knitr::opts_chunk$set(
1515
# out.width = "100%"
1616
)
1717
18+
# get package versions
1819
library(vcdExtra)
20+
cran_version <- available.packages(repos = "https://cloud.r-project.org")["vcdExtra", "Version"]
21+
dev_version <- getNamespaceVersion("vcdExtra")
1922
```
2023

2124
<!-- badges: start -->
@@ -53,16 +56,16 @@ It is also used in my graduate course, [Psy 6136: Categorical Data Analysis](htt
5356

5457
## Installation
5558

56-
Get the released version from CRAN:
59+
Get the released version (`r cran_version`) from CRAN:
5760

5861
install.packages("vcdExtra")
5962

60-
The current development version can be installed from [R-universe](https://friendly.r-universe.dev/vcdExtra) or
63+
The current development version (`r dev_version`) can be installed from [R-universe](https://friendly.r-universe.dev/vcdExtra) or
6164
directly from the [GitHub repo](https://github.com/friendly/vcdExtra) via:
6265

6366
if (!require(remotes)) install.packages("remotes")
6467
65-
install.packages("mvinfluence", repos = c('https://friendly.r-universe.dev')
68+
install.packages("vcdExtra", repos = c('https://friendly.r-universe.dev')
6669
# or
6770
remotes::install_github("friendly/vcdExtra", build_vignettes = TRUE)
6871

@@ -137,21 +140,33 @@ vcdExtra::datasets("vcdExtra")[,1]
137140
* 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")`;
138141

139142
```{r vignettes}
140-
tools::getVignetteInfo("vcdExtra")[,c("File", "Title")] |> knitr::kable()
143+
vigns <- as.data.frame(tools::getVignetteInfo("vcdExtra")[,c("File", "Title")])
144+
vigns$Title <- paste0("[", vigns$Title, "](https://friendly.github.io/vcdExtra/articles/",
145+
tools::file_path_sans_ext(vigns$File), ".html)")
146+
vigns |> knitr::kable()
141147
```
142148

143149
* a few useful utility functions for manipulating categorical data sets and working with models for
144-
categorical data.
150+
categorical data: `joint()`, `conditional()`, `mutual()`, `saturated()`.
151+
152+
* A re-implementation of `vcd::woolf_test()` extends the analysis of homogeneity of odds ratios
153+
in 2 x 2 x R x C tables to provide tests for differences among the R strata rows and C strata columns.
154+
155+
145156

146157

147158
## Examples
148159

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

153-
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`).
154-
Both are _ordered_ factors.
164+
### `Mental` dataset
165+
The dataset `vcdExtra::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`).
166+
Both are _ordered_ factors. The questions are:
167+
* Is `mental` health associated with parents `ses`?
168+
* If so, what is the pattern/nature of the association?
169+
* How can I take the ordinal nature of the factors into account?
155170

156171
```{r ex-mental1}
157172
data(Mental)
@@ -212,6 +227,11 @@ These models typically use equally spaced _integer_ scores.
212227
The test for association here is analogous to a test of the correlation
213228
between the frequency-weighted scores, carried out using `CMHtest()`.
214229

230+
```{r}
231+
CMHtest(Mental.tab)
232+
```
233+
234+
215235
In the data, `ses` and `mental` were declared to be ordered factors,
216236
so using `as.numeric(Mental$ses)` is sufficient to create a new `Cscore`
217237
variable. Similarly for the numeric version of `mental`, giving `Rscore`.

README.md

Lines changed: 47 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ Data Analysis](https://friendly.github.io/psy6136/).
4646

4747
## Installation
4848

49-
Get the released version from CRAN:
49+
Get the released version (0.8.7) from CRAN:
5050

5151
install.packages("vcdExtra")
5252

53-
The current development version can be installed from
53+
The current development version (0.9.0) can be installed from
5454
[R-universe](https://friendly.r-universe.dev/vcdExtra) or directly from
5555
the [GitHub repo](https://github.com/friendly/vcdExtra) via:
5656

5757
if (!require(remotes)) install.packages("remotes")
5858
59-
install.packages("mvinfluence", repos = c('https://friendly.r-universe.dev')
59+
install.packages("vcdExtra", repos = c('https://friendly.r-universe.dev')
6060
# or
6161
remotes::install_github("friendly/vcdExtra", build_vignettes = TRUE)
6262

@@ -76,11 +76,11 @@ packages.
7676

7777
##### See also:
7878

79-
<a href="https://www.routledge.com/Discrete-Data-Analysis-with-R-Visualization-and-Modeling-Techniques-for/Friendly-Meyer/p/book/9781498725835"><img src="man/figures/ddar-cover.png" style="height:70px;"/></a
79+
<a href="https://www.routledge.com/Discrete-Data-Analysis-with-R-Visualization-and-Modeling-Techniques-for/Friendly-Meyer/p/book/9781498725835"><img src="man/figures/ddar-cover.png" style="height:80px;"/></a
8080

81-
<a href="https://friendly.github.io/psy6136/"><img src="https://friendly.github.io/psy6136/icons/psy6136-highres.png" style="height:70px;" /></a
81+
<a href="https://friendly.github.io/psy6136/"><img src="https://friendly.github.io/psy6136/icons/psy6136-highres.png" style="height:80px;" /></a
8282

83-
<a href="https://friendly.github.io/nestedLogit/"><img src="https://friendly.github.io/nestedLogit/logo.png" style="height:70px;" /></a>
83+
<a href="https://friendly.github.io/nestedLogit/"><img src="https://friendly.github.io/nestedLogit/logo.png" style="height:80px;" /></a>
8484

8585
- My book, [*Discrete Data Analysis with R: Visualization and Modeling
8686
Techniques for Categorical and Count
@@ -157,26 +157,48 @@ vcdExtra::datasets("vcdExtra")[,1]
157157
`browseVignettes(package = "vcdExtra")`;
158158

159159
``` r
160-
tools::getVignetteInfo("vcdExtra")[,c("File", "Title")] |> knitr::kable()
160+
vigns <- as.data.frame(tools::getVignetteInfo("vcdExtra")[,c("File", "Title")])
161+
vigns$Title <- paste0("[", vigns$Title, "](https://friendly.github.io/vcdExtra/articles/",
162+
tools::file_path_sans_ext(vigns$File), ".html)")
163+
vigns |> knitr::kable()
161164
```
162165

163166
| File | Title |
164-
|:-----|:------|
167+
|:---|:---|
168+
| a1-creating.Rmd | [1. Creating and manipulating frequency tables](https://friendly.github.io/vcdExtra/articles/a1-creating.html) |
169+
| a2-tests.Rmd | [2. Tests of Independence](https://friendly.github.io/vcdExtra/articles/a2-tests.html) |
170+
| a3-loglinear.Rmd | [3. Loglinear Models](https://friendly.github.io/vcdExtra/articles/a3-loglinear.html) |
171+
| a4-mosaics.Rmd | [4. Mosaic plots](https://friendly.github.io/vcdExtra/articles/a4-mosaics.html) |
172+
| a5-demo-housing.Rmd | [5. Demo - Housing Data](https://friendly.github.io/vcdExtra/articles/a5-demo-housing.html) |
173+
| a6-mobility.Rmd | [6. Mobility tables](https://friendly.github.io/vcdExtra/articles/a6-mobility.html) |
174+
| a7-continuous.Rmd | [7. Continuous predictors](https://friendly.github.io/vcdExtra/articles/a7-continuous.html) |
175+
| datasets.Rmd | [Datasets for categorical data analysis](https://friendly.github.io/vcdExtra/articles/datasets.html) |
176+
| tidyCats.Rmd | [tidyCat: Tidy Methods For Categorical Data Analysis](https://friendly.github.io/vcdExtra/articles/tidyCats.html) |
165177

166178
- a few useful utility functions for manipulating categorical data sets
167-
and working with models for categorical data.
179+
and working with models for categorical data: `joint()`,
180+
`conditional()`, `mutual()`, `saturated()`.
181+
182+
- A re-implementation of `vcd::woolf_test()` extends the analysis of
183+
homogeneity of odds ratios in 2 x 2 x R x C tables to provide tests
184+
for differences among the R strata rows and C strata columns.
168185

169186
## Examples
170187

171-
These `README` examples simply provide illustrations of using some of
188+
These `README` examples provide simple illustrations of using some of
172189
the package functions in the context of loglinear models for frequency
173190
tables fit using `glm()`, including models for *structured associations*
174191
taking ordinality into account.
175192

176-
The dataset `Mental` is a data frame frequency table representing the
177-
cross-classification of mental health status (`mental`) of 1660 young
178-
New York residents by their parents’ socioeconomic status (`ses`). Both
179-
are *ordered* factors.
193+
### `Mental` dataset
194+
195+
The dataset `vcdExtra::Mental` is a data frame frequency table
196+
representing the cross-classification of mental health status (`mental`)
197+
of 1660 young New York residents by their parents’ socioeconomic status
198+
(`ses`). Both are *ordered* factors. The questions are: \* Is `mental`
199+
health associated with parents `ses`? \* If so, what is the
200+
pattern/nature of the association? \* How can I take the ordinal nature
201+
of the factors into account?
180202

181203
``` r
182204
data(Mental)
@@ -264,6 +286,17 @@ variables. These models typically use equally spaced *integer* scores.
264286
The test for association here is analogous to a test of the correlation
265287
between the frequency-weighted scores, carried out using `CMHtest()`.
266288

289+
``` r
290+
CMHtest(Mental.tab)
291+
## Cochran-Mantel-Haenszel Statistics for ses by mental
292+
##
293+
## AltHypothesis Chisq Df Prob
294+
## cor Nonzero correlation 37.156 1 1.0907e-09
295+
## rmeans Row mean scores differ 40.297 5 1.3012e-07
296+
## cmeans Col mean scores differ 40.666 3 7.6971e-09
297+
## general General association 45.958 15 5.4003e-05
298+
```
299+
267300
In the data, `ses` and `mental` were declared to be ordered factors, so
268301
using `as.numeric(Mental$ses)` is sufficient to create a new `Cscore`
269302
variable. Similarly for the numeric version of `mental`, giving

cran-comments.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Test environments
22
* local Windows 10, R version 4.5.2 (2025-10-31 ucrt)
3-
* win-builder R Under development (unstable) (2025-07-22 r88445 ucrt)
3+
* win-builder R Under development (unstable) (2026-01-18 r89306 ucrt)
44

55

66
## R CMD check results
@@ -17,19 +17,20 @@ This is a major release of the package, adding structure to dataset examples and
1717
* Generalized `vcd::woolf_test()` to handle strata better, with special handling for 2 x 2 x R x C case.
1818
* Completed extension of `vcd::woolf_test()` to fully handle R x C strata, with tests for rows/cols/residuals
1919
* Added GH actions R-CMD-check & pkgdown
20+
* Now depends R (>= 4.1.0) due to use of native pipe `|>`
21+
* Fixed some broken URLs in `R/data.R`
2022

2123
# reverse dependencies
2224

2325
> devtools::revdep()
24-
[1] "aplore3" "catdata" "genridge" "gnm"
25-
[5] "heplots" "iarm" "jmv" "public.ctn0094data"
26-
[9] "reappraised"
26+
[1] "aplore3" "catdata" "genridge" "gnm" "heplots"
27+
[6] "iarm" "jmv" "junco" "public.ctn0094data" "reappraised"
2728

2829
> revdepcheck::revdep_check(num_workers = 4)
2930
3031
## revdepcheck results
3132

32-
We checked 9 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
33+
We checked 10 reverse dependencies, comparing R CMD check results across CRAN and dev versions of this package.
3334

3435
* We saw 0 new problems
3536
* We failed to check 0 packages

vignettes/tidyCats.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ expand.dft(hec.df) |> head()
7676
```
7777

7878

79-
* `vcd::structable()` (and `stats::ftable()`) produce a flat representation of a high-dimensional contingency table constructed by recursive splits (similar to the construction of mosaic displays). One can be constructed from a table or from a data frame with
79+
* `vcd::structable()` (and `stats::ftable()`) produce a 'flat' representation of a high-dimensional contingency table constructed by recursive splits (similar to the construction of mosaic displays). One can be constructed from a table or from a data frame with
8080
a formula method,
8181

8282
```{r}

0 commit comments

Comments
 (0)