Skip to content

Commit

Permalink
Add empty_room function. (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
MHenderson authored Jun 23, 2024
1 parent 0539022 commit c2a0252
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: wallis
Title: Room squares in R
Version: 0.0.0.9003
Version: 0.0.0.9004
Authors@R:
person("Matthew", "Henderson", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-7949-8208"))
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(empty_cells)
export(empty_room)
export(n_filled_cells)
export(plot_room_square)
export(unused_pairs)
Expand Down
10 changes: 10 additions & 0 deletions R/empty-room.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#' Create a partial Room square with no filled cells
#'
#' @param n Size of partial Room square to create.
#'
#' @return A partial Room square of size n with no filled cells.
#' @export
empty_room <- function(n = 5) {
tidyr::expand_grid(row = 1:(n - 1), col = 1:(n - 1)) |>
dplyr::mutate(first = as.numeric(NA), second = as.numeric(NA))
}
17 changes: 17 additions & 0 deletions man/empty_room.Rd

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

0 comments on commit c2a0252

Please sign in to comment.