From 822a7472c7486b619134c25358ac25b03b83ceaa Mon Sep 17 00:00:00 2001 From: Matthew Henderson Date: Tue, 28 May 2024 07:39:41 +0000 Subject: [PATCH 1/2] Remove the create-latin-square function. --- R/create-latin-square.R | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 R/create-latin-square.R diff --git a/R/create-latin-square.R b/R/create-latin-square.R deleted file mode 100644 index e2e1ff9..0000000 --- a/R/create-latin-square.R +++ /dev/null @@ -1,15 +0,0 @@ -#' Generate latin squares -#' -#' Create a latin square by first generating a -#' 1 x l_order latin rectangle and then embedding -#' it in a latin square. -#' -#' @param l_order Latin square order. -#' -#' @return A latin square. -#' @export -create_latin_square <- function(l_order) { - tidyr::expand_grid(row = 1:1, column = 1:l_order) |> - dplyr::mutate(symbol = 1:l_order) #|> - #embedding(l_order = l_order, rows = 2:l_order) -} \ No newline at end of file From 5cd9de256dde86d312661828b296bb5ef7ffb01c Mon Sep 17 00:00:00 2001 From: Matthew Henderson Date: Tue, 28 May 2024 07:40:14 +0000 Subject: [PATCH 2/2] Export only add_cols and add_rows functions. --- DESCRIPTION | 2 +- NAMESPACE | 9 --------- R/edge-tbl.R | 1 - R/next-col.R | 2 -- R/next-row.R | 3 --- R/to-tidygraph.R | 2 -- man/create_latin_square.Rd | 19 ------------------- 7 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 man/create_latin_square.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 7b244a4..463614b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: keedwell Title: Latin Squares in R -Version: 0.1.1.9000 +Version: 0.1.1.9001 Authors@R: person("Matthew", "Henderson", , "matthew.james.henderson@gmail.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-7949-8208")) diff --git a/NAMESPACE b/NAMESPACE index 35344d5..9f5d919 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,12 +2,3 @@ export(add_cols) export(add_rows) -export(create_latin_square) -export(edge_tbl) -export(next_col_matching) -export(next_col_random) -export(next_row) -export(next_row_matching) -export(next_row_random) -export(to_tidygraph) -export(to_tidygraph_2) diff --git a/R/edge-tbl.R b/R/edge-tbl.R index fea2042..eed4603 100644 --- a/R/edge-tbl.R +++ b/R/edge-tbl.R @@ -12,7 +12,6 @@ #' @param l_order size of latin square R is going to be embedded into #' #' @return The edge data frame. -#' @export edge_tbl <- function(R, i, l_order = 3) { all_symbols <- 1:l_order diff --git a/R/next-col.R b/R/next-col.R index cc337e3..8bd0ed3 100644 --- a/R/next-col.R +++ b/R/next-col.R @@ -5,7 +5,6 @@ #' @param l_order dimension #' #' @return a latin rectangle with more columns -#' @export next_col_matching <- function(R, i, l_order) { n_rows <- max(R$row) @@ -51,7 +50,6 @@ next_col_matching <- function(R, i, l_order) { #' @param l_order dimension #' #' @return A latin rectangle with more columns -#' @export next_col_random <- function(R, i, l_order) { n_rows <- max(R$row) diff --git a/R/next-row.R b/R/next-row.R index 15bcba0..7483e36 100644 --- a/R/next-row.R +++ b/R/next-row.R @@ -13,7 +13,6 @@ #' @param l_order The order of the input latin square #' #' @return A bipartite graph. -#' @export next_row <- function(R, l_order) { bg <- to_tidygraph(R, l_order) @@ -45,7 +44,6 @@ next_row <- function(R, l_order) { #' @param l_order Order of R #' #' @return A latin square with more rows. -#' @export next_row_random <- function(R, i, l_order) { R |> @@ -75,7 +73,6 @@ next_row_random <- function(R, i, l_order) { #' @param l_order Order of R #' #' @return A latin rectangle with more rows. -#' @export next_row_matching <- function(R, i, l_order) { bg <- to_tidygraph(R, l_order) diff --git a/R/to-tidygraph.R b/R/to-tidygraph.R index 543a49d..c05ea34 100644 --- a/R/to-tidygraph.R +++ b/R/to-tidygraph.R @@ -10,7 +10,6 @@ #' @param l_order Order of R. #' #' @return A bipartite graph. -#' @export to_tidygraph <- function(R, l_order = 3) { ## VERTEX DATA FRAME @@ -40,7 +39,6 @@ to_tidygraph <- function(R, l_order = 3) { #' @param n_cols Number of columns. #' #' @return A bipartite graph. -#' @export to_tidygraph_2 <- function(R, l_order, n_rows, n_cols) { ## VERTEX DATA FRAME diff --git a/man/create_latin_square.Rd b/man/create_latin_square.Rd deleted file mode 100644 index 0eb16d0..0000000 --- a/man/create_latin_square.Rd +++ /dev/null @@ -1,19 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/create-latin-square.R -\name{create_latin_square} -\alias{create_latin_square} -\title{Generate latin squares} -\usage{ -create_latin_square(l_order) -} -\arguments{ -\item{l_order}{Latin square order.} -} -\value{ -A latin square. -} -\description{ -Create a latin square by first generating a -1 x l_order latin rectangle and then embedding -it in a latin square. -}