Skip to content

First CRAN Release

Latest
Compare
Choose a tag to compare
@leeper leeper released this 27 Jul 12:32

This is the first release of cregg to CRAN. v0.2.0 didn't quite pass their checks, so I've been waiting on a second attempt at release until the below functionality was added. There are two core additions.

Support for tidying conjoint datasets

  • Added function cj_tidy() to tidy a "wide" respondent-length conjoint dataset into a "long" respondenttaskalternative-length dataset. An example dataset, wide_conjoint, is provided for examples and testing.

New attribute-preserving data frame class

The package now provides a data frame class "cj_df" that preserves "label" attribute during subsetting. This facilitates pretty printing and plotting of attribute labels even during complex operations. This has been implemented in several places:

  • Added function cj_df(), which provides a modified data frame class ("cj_df") that preserves variable "label" attributes when subsetting.
  • cj() now imposes class "cj_df" on data to preserve attributes during subsetting.
  • Built-in datasets immigration and taxes gain a "cj_df" class.
  • cj_tidy() now returns objects of class c("cj_df", "data.frame").

Other user-visible changes

  • Added function cj_table(), which can be useful in communicating the set of features and levels used in the design as a data frame (e.g,. using knitr::kable(cj_table(data, ~ feat1 + feat2))).
  • Renamed functions props() -> cj_props() and freqs() to cj_freqs() for API consistency.