Skip to content

Commit

Permalink
exokire 1.3.3.9005: use_data_wordle()
Browse files Browse the repository at this point in the history
  • Loading branch information
rolkra committed Nov 10, 2024
1 parent c3e0def commit 3530ddd
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: explore
Title: Simplifies Exploratory Data Analysis
Version: 1.3.3.9004
Version: 1.3.3.9005
Authors@R:
person("Roland", "Krasser", , "[email protected]", role = c("aut", "cre"))
Description: Interactive data exploration with one line of code, automated
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ export(use_data_mtcars)
export(use_data_penguins)
export(use_data_starwars)
export(use_data_titanic)
export(use_data_wordle)
export(weight_target)
export(yyyymm_calc)
import(dplyr)
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* add `explore_col()` for simple bar plots without aggregation
* add `yyyymm_calc()` for calculation with periods (format yyyymm)
* add `use_data_wordle()`: data from a wordle challange
* update vignette `abtest.Rmd`

## Bug fixes / internal
Expand Down
18 changes: 18 additions & 0 deletions R/use-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,21 @@ use_data_beer <- function() {
# return data as tibble
tibble::as_tibble(data)
}

#' Use the wordle data set
#'
#' This data set contains the result of a real wordle challange (in german language)
#' between tow players. Wordle is a game where a player guesses a five-letter
#' word in six tries. The variable "try" reflects the success of player A and B.
#' Other variables like "noun", "aeiou", "unique", "common" and "rare" reflect
#' the properties of the word.
#' @return Dataset
#' @examples
#' use_data_wordle()
#' @export

use_data_wordle <- function() {
file <- system.file("extdata", "wordle.rds", package="explore")
data <- readRDS(file = file)
return(tibble::as_tibble(data))
}
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
Simplifies Exploratory Data Analysis:

- **Interactive data exploration** using `explore()`
- Use **AI** to unveil hidden patterns in your data (xgboost, RF, logreg, DT)
- Generate an **automated report** of your data (or patterns in your data) using `report()`
- **Manual exploration** using `explore()`, `describe()`, `explain_*()`, `abtest()`, ...
- Ready to use **Datasets for teaching & testing**

``` r
# install from CRAN
Expand Down
Binary file added inst/extdata/wordle.rds
Binary file not shown.
21 changes: 21 additions & 0 deletions man/use_data_wordle.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions tests/testthat/test-use-data.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ test_that("use_data returns a data frame.", {
expect_s3_class(use_data_penguins(), "data.frame")
expect_s3_class(use_data_titanic(), "data.frame")
expect_s3_class(use_data_beer(), "data.frame")
expect_s3_class(use_data_wordle(), "data.frame")
})

# use_data returns data.frame with >0 rows ----------
Expand All @@ -20,6 +21,7 @@ test_that("use_data returns data frames with >0 rows", {
expect_gt(nrow(use_data_penguins()), 0)
expect_gt(nrow(use_data_titanic()), 0)
expect_gt(nrow(use_data_beer()), 0)
expect_gt(nrow(use_data_wordle()), 0)
})

# use_data returns data.frame with >0 rows
Expand Down
1 change: 1 addition & 0 deletions vignettes/explore.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ Use one of the prepared datasets to explore:
* `use_data_penguins()`
* `use_data_starwars()`
* `use_data_titanic()`
* `use_data_wordle()`

```{r message=FALSE, warning=FALSE, fig.width=6, fig.height=3}
use_data_beer() %>% describe()
Expand Down

0 comments on commit 3530ddd

Please sign in to comment.