Skip to content

Commit

Permalink
Prepare first release (#7)
Browse files Browse the repository at this point in the history
* Add documentation.

* Prepare for release.
  • Loading branch information
MHenderson authored Apr 22, 2024
1 parent 924476d commit 7994ed1
Show file tree
Hide file tree
Showing 14 changed files with 146 additions and 21 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: keedwell
Title: Latin Squares in R
Version: 0.0.0.9000
Version: 0.1.0
Authors@R:
person("Matthew", "Henderson", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-7949-8208"))
Expand All @@ -14,4 +14,4 @@ Imports:
purrr,
tibble,
tidygraph,
tidyr
tidyr
5 changes: 5 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(add_rows)
export(create_latin_square)
export(edge_tbl)
export(next_row)
export(to_tidygraph)
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# keedwell (development version)

# keedwell (v0.1.0)

* Imported functions from mhall-in-r.
4 changes: 1 addition & 3 deletions R/add-rows.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@
#' @param R latin rectangle
#' @param rows empty rows to be filled
#'
#' @return
#' @return A latin rectangle with more rows.
#' @export
#'
#' @examples
add_rows <- function(R, rows) {

# we assume that the dimension equals
Expand Down
6 changes: 2 additions & 4 deletions R/create-latin-square.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
#' 1 x l_order latin rectangle and then embedding
#' it in a latin square.
#'
#' @param l_order
#' @param l_order Latin square order.
#'
#' @return
#' @return A latin square.
#' @export
#'
#' @examples
create_latin_square <- function(l_order) {
tidyr::expand_grid(row = 1:1, column = 1:l_order) |>
dplyr::mutate(symbol = 1:l_order) |>
Expand Down
4 changes: 1 addition & 3 deletions R/edge-tbl.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@
#' @param i column
#' @param l_order size of latin square R is going to be embedded into
#'
#' @return
#' @return The edge data frame.
#' @export
#'
#' @examples
edge_tbl <- function(R, i, l_order = 3) {

all_symbols <- 1:l_order
Expand Down
8 changes: 3 additions & 5 deletions R/next-row.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,11 @@
#' missing from columns and then find a maximum
#' matching in that bipartite graph.
#'
#' @param R
#' @param l_order
#' @param R A latin square
#' @param l_order The order of the input latin square
#'
#' @return
#' @return A bipartite graph.
#' @export
#'
#' @examples
next_row <- function(R, l_order) {
bg <- to_tidygraph(R, l_order)

Expand Down
7 changes: 3 additions & 4 deletions R/to-tidygraph.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
#' vertices for columns and symbols and edges representing
#' symbols missing from columns.
#'
#' @param R
#' @param R A latin rectangle.
#' @param l_order Order of R.
#'
#' @return
#' @return A bipartite graph.
#' @export
#'
#' @examples
to_tidygraph <- function(R, l_order = 3) {

## VERTEX DATA FRAME
Expand Down
1 change: 1 addition & 0 deletions keedwell.Rproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ LaTeX: pdfLaTeX
BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageRoxygenize: rd,collate,namespace

UseNativePipeOperator: Yes
27 changes: 27 additions & 0 deletions man/add_rows.Rd

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

19 changes: 19 additions & 0 deletions man/create_latin_square.Rd

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

27 changes: 27 additions & 0 deletions man/edge_tbl.Rd

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

27 changes: 27 additions & 0 deletions man/next_row.Rd

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

23 changes: 23 additions & 0 deletions man/to_tidygraph.Rd

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

0 comments on commit 7994ed1

Please sign in to comment.