% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/y_rows.R
\name{rows}
\alias{rows}
\alias{list_rows}
\alias{remove_rows}
\alias{add_row}
\alias{move_row}
\alias{update_row}
\alias{select_row}
\title{Update rows in your metadata}
\usage{
list_rows(x)

remove_rows(x, id)

add_row(x, id, ..., .pos = length(x[["rows"]]) + 1L)

move_row(x, id, .pos = length(x[["rows"]]))

update_row(x, id, ...)

select_row(x, id)
}
\arguments{
\item{x}{\code{mighty_domain()} Object to manipulate.}

\item{id}{\code{character()} Id of the row(s) to remove, add, or move.}

\item{...}{Additional properties to add for the row, e.g. a \code{label = "my row"}.}

\item{.pos}{\code{integer(1)} Position to put or move the row to. Default places the row as the last.}
}
\value{
\code{invisible(x)}
}
\description{
Functions to list, select, remove, add, update, and move row operations in
your \code{mighty_domain()} objects.
}
\examples{
# Load example configuration
x <- mighty_domain(
  file = system.file("examples", "advs.yml", package = "mighty.metadata")
)

# List all rows defined
list_rows(x)

# Add a new row
y <- x |>
  add_row(id = "NEW")

list_rows(y)

# Remove the new row again
y |>
  remove_rows("NEW") |>
  list_rows()

# Update an existing row
x |>
  update_row(id = "BASELINE", method = "Updated method") |>
  select_row(id = "BASELINE") |>
  str()

# Select a specific row
select_row(x, id = "BASELINE") |>
  str()

}
