diff --git a/DESCRIPTION b/DESCRIPTION index 0848e3c..f45e71b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -74,6 +74,7 @@ Collate: 'reexport.R' 'relabel.R' 'rename_variable.R' + 'update_description.R' 'upgrade_data.R' 'utils.R' 'verify_vc.R' diff --git a/NAMESPACE b/NAMESPACE index 54ae455..15c92a2 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -62,6 +62,7 @@ export(rename_variable) export(repository) export(rm_data) export(status) +export(update_description) export(upgrade_data) export(verify_vc) export(write_vc) @@ -88,6 +89,7 @@ importFrom(utils,file_test) importFrom(utils,flush.console) importFrom(utils,packageVersion) importFrom(utils,read.table) +importFrom(utils,tail) importFrom(utils,write.table) importFrom(yaml,as.yaml) importFrom(yaml,read_yaml) diff --git a/R/meta.R b/R/meta.R index ec940af..22483df 100644 --- a/R/meta.R +++ b/R/meta.R @@ -36,9 +36,7 @@ meta <- function(x, ...) { #' @export #' @rdname meta #' @importFrom assertthat assert_that is.string noNA -meta.character <- function( - x, na = "NA", optimize = TRUE, description = character(0), ... -) { +meta.character <- function(x, na = "NA", optimize = TRUE, ...) { assert_that(is.string(na), noNA(na), no_whitespace(na)) assert_that(is.flag(optimize), noNA(optimize)) x <- enc2utf8(x) @@ -50,40 +48,23 @@ Please use a different NA string or consider using a factor.", call. = FALSE) to_escape <- grepl(ifelse(optimize, "(\"|\t|\n)", "(\"|,|\n)"), x) x[to_escape] <- paste0("\"", x[to_escape], "\"") x[is.na(x)] <- na - list(class = "character", na_string = na) |> - meta_desc(description = description) -> m + list(class = "character", na_string = na) -> m class(m) <- "meta_detail" attr(x, "meta") <- m return(x) } -#' @importFrom assertthat assert_that is.string -meta_desc <- function(meta, description) { - assert_that(is.character(description), is.list(meta)) - if (length(description) == 0) { - return(meta) - } - assert_that(is.string(description)) - if (is.na(description)) { - return(meta) - } else { - return(c(meta, description = unname(description))) - } -} - #' @export -meta.integer <- function(x, description = character(0), ...) { - list(class = "integer") |> - meta_desc(description = description) -> m +meta.integer <- function(x, ...) { + list(class = "integer") -> m class(m) <- "meta_detail" attr(x, "meta") <- m return(x) } #' @export -meta.numeric <- function(x, description = character(0), ...) { - list(class = "numeric") |> - meta_desc(description = description) -> m +meta.numeric <- function(x, ...) { + list(class = "numeric") -> m class(m) <- "meta_detail" attr(x, "meta") <- m return(x) @@ -105,8 +86,7 @@ meta.numeric <- function(x, description = character(0), ...) { #' `meta()` ignores, with a warning, any change in the order of factor levels. #' Add `strict = FALSE` to enforce the new order of factor levels. meta.factor <- function( - x, optimize = TRUE, na = "NA", index, strict = TRUE, - description = character(0), ... + x, optimize = TRUE, na = "NA", index, strict = TRUE, ... ) { assert_that(is.flag(optimize), noNA(optimize), is.flag(strict), noNA(strict)) levels(x) <- enc2utf8(levels(x)) @@ -154,8 +134,7 @@ Please use a different NA string or use optimize = TRUE") list( class = "factor", na_string = na, optimize = optimize, labels = names(index), index = unname(index), ordered = is.ordered(x) - ) |> - meta_desc(description = description) -> m + ) -> m class(m) <- "meta_detail" attr(z, "meta") <- m return(z) @@ -164,23 +143,20 @@ Please use a different NA string or use optimize = TRUE") #' @export #' @rdname meta #' @importFrom assertthat assert_that is.flag noNA -meta.logical <- function(x, optimize = TRUE, description = character(0), ...) { +meta.logical <- function(x, optimize = TRUE, ...) { assert_that(is.flag(optimize), noNA(optimize)) if (optimize) { x <- as.integer(x) } - list(class = "logical", optimize = optimize) |> - meta_desc(description = description) -> m + list(class = "logical", optimize = optimize) -> m class(m) <- "meta_detail" attr(x, "meta") <- m return(x) } #' @export -meta.complex <- function(x, description = character(0), ...) { - assert_that(is.character(description), length(description) <= 1) - list(class = "complex") |> - meta_desc(description = description) -> m +meta.complex <- function(x, ...) { + list(class = "complex") -> m class(m) <- "meta_detail" attr(x, "meta") <- m return(x) @@ -189,22 +165,20 @@ meta.complex <- function(x, description = character(0), ...) { #' @export #' @rdname meta #' @importFrom assertthat assert_that is.flag noNA -meta.POSIXct <- function(x, optimize = TRUE, description = character(0), ...) { +meta.POSIXct <- function(x, optimize = TRUE, ...) { assert_that(is.flag(optimize), noNA(optimize)) if (optimize) { z <- unclass(x) list( class = "POSIXct", optimize = TRUE, origin = "1970-01-01 00:00:00", timezone = "UTC" - ) |> - meta_desc(description = description) -> m + ) -> m } else { z <- format(x, format = "%Y-%m-%dT%H:%M:%SZ", tz = "UTC") list( class = "POSIXct", optimize = FALSE, format = "%Y-%m-%dT%H:%M:%SZ", timezone = "UTC" - ) |> - meta_desc(description = description) -> m + ) -> m } class(m) <- "meta_detail" attr(z, "meta") <- m @@ -214,16 +188,14 @@ meta.POSIXct <- function(x, optimize = TRUE, description = character(0), ...) { #' @export #' @rdname meta #' @importFrom assertthat assert_that is.flag noNA -meta.Date <- function(x, optimize = TRUE, description = character(0), ...) { +meta.Date <- function(x, optimize = TRUE, ...) { assert_that(is.flag(optimize), noNA(optimize)) if (optimize) { z <- as.integer(x) - list(class = "Date", optimize = TRUE, origin = "1970-01-01") |> - meta_desc(description = description) -> m + list(class = "Date", optimize = TRUE, origin = "1970-01-01") -> m } else { z <- format(x, format = "%Y-%m-%d") - list(class = "Date", optimize = FALSE, format = "%Y-%m-%d") |> - meta_desc(description = description) -> m + list(class = "Date", optimize = FALSE, format = "%Y-%m-%d") -> m } class(m) <- "meta_detail" attr(z, "meta") <- m @@ -246,7 +218,7 @@ meta.Date <- function(x, optimize = TRUE, description = character(0), ...) { #' @inheritParams write_vc meta.data.frame <- function(# nolint x, optimize = TRUE, na = "NA", sorting, strict = TRUE, - split_by = character(0), description = character(0), ... + split_by = character(0), ... ) { assert_that( !has_name(x, "..generic"), @@ -263,11 +235,6 @@ meta.data.frame <- function(# nolint any(!colnames(x) %in% split_by), msg = "No remaining variables after splitting" ) - assert_that(is.character(description)) - stopifnot( - "All names in `description` must match an existing variable in `x`" = - all(names(description) %in% colnames(x)) - ) dots <- list(...) if (has_name(dots, "old")) { @@ -308,12 +275,10 @@ Add extra sorting variables to ensure small diffs.", sorted) if (!has_name(dots, "old")) { z <- lapply( colnames(x), - function(id, optimize, na, description) { - meta( - x[[id]], optimize = optimize, na = na, description = description[id] - ) + function(id, optimize, na) { + meta(x[[id]], optimize = optimize, na = na) }, - optimize = optimize, na = na, description = description + optimize = optimize, na = na ) names(z) <- colnames(x) } else { @@ -321,16 +286,15 @@ Add extra sorting variables to ensure small diffs.", sorted) if (length(common)) { z_common <- lapply( common, - function(id, optimize, na, strict, description) { + function(id, optimize, na, strict) { meta( x[[id]], optimize = optimize, na = na, index = setNames(old[[id]][["index"]], old[[id]][["labels"]]), - strict = strict, description = description[id] + strict = strict ) }, optimize = old[["..generic"]][["optimize"]], - na = old[["..generic"]][["NA string"]], - strict = strict, description = description + na = old[["..generic"]][["NA string"]], strict = strict ) names(z_common) <- common } else { @@ -340,13 +304,10 @@ Add extra sorting variables to ensure small diffs.", sorted) if (length(new)) { z_new <- lapply( new, - function(id, optimize, na, description) { - meta( - x[[id]], optimize = optimize, na = na, - description = description[id] - ) + function(id, optimize, na) { + meta(x[[id]], optimize = optimize, na = na) }, - optimize = optimize, na = na, description = description + optimize = optimize, na = na ) names(z_new) <- new } else { diff --git a/R/print.R b/R/print.R index b2231fc..fad70c9 100644 --- a/R/print.R +++ b/R/print.R @@ -3,10 +3,21 @@ #' Prints the data and the description of the columns when available. #' @param x a `git2rdata` object #' @param ... additional arguments passed to `print` +#' @family internal #' @export +#' @importFrom utils tail print.git2rdata <- function(x, ...) { class(x) <- tail(class(x), -1) print(x, ...) + if (has_attr(x, "table name")) { + cat("\nTable name: ", attr(x, "table name")) + } + if (has_attr(x, "title")) { + cat("\nTitle: ", attr(x, "title")) + } + if (has_attr(x, "description")) { + cat("\nDescription: ", attr(x, "description")) + } vapply(colnames(x), display_description, character(1), x = x) |> cat() return(invisible(NULL)) @@ -26,11 +37,22 @@ display_description <- function(x, colname) { #' available. #' @param object a `git2rdata` object #' @param ... additional arguments passed to `summary` +#' @family internal #' @export +#' @importFrom utils tail summary.git2rdata <- function(object, ...) { class(object) <- tail(class(object), -1) summary(object, ...) |> print() + if (has_attr(object, "table name")) { + cat("\nTable name: ", attr(object, "table name")) + } + if (has_attr(object, "title")) { + cat("\nTitle: ", attr(object, "title")) + } + if (has_attr(object, "description")) { + cat("\nDescription: ", attr(object, "description")) + } vapply(colnames(object), display_description, character(1), x = object) |> cat() return(invisible(NULL)) diff --git a/R/read_vc.R b/R/read_vc.R index da5a7f6..ace2de4 100644 --- a/R/read_vc.R +++ b/R/read_vc.R @@ -142,10 +142,20 @@ read_vc.character <- function(file, root = ".") { } ) has_description <- names(has_description)[has_description] - if (length(has_description) > 0) { - for (desc in has_description) { - attr(raw_data[[desc]], "description") <- details[[desc]]$description - } + for (desc in has_description) { + attr(raw_data[[desc]], "description") <- details[[desc]]$description + } + + if (has_name(meta_data[["..generic"]], "name")) { + attr(raw_data, "table name") <- meta_data[["..generic"]][["name"]] + } + + if (has_name(meta_data[["..generic"]], "title")) { + attr(raw_data, "title") <- meta_data[["..generic"]][["title"]] + } + + if (has_name(meta_data[["..generic"]], "description")) { + attr(raw_data, "description") <- meta_data[["..generic"]][["description"]] } class(raw_data) <- c("git2rdata", class(raw_data)) diff --git a/R/update_description.R b/R/update_description.R new file mode 100644 index 0000000..042d6c9 --- /dev/null +++ b/R/update_description.R @@ -0,0 +1,71 @@ +#' Update the description of a `git2rdata` object +#' +#' Allows to update the description of the fields, the table name, the title, +#' and the description of a `git2rdata` object. +#' All arguments are optional. +#' Setting an argument to `NA` or an empty string will remove the corresponding +#' field from the metadata. +#' +#' @inheritParams is_git2rmeta +#' @param field_description a named character vector with the new descriptions +#' for the fields. +#' The names of the vector must match the variable names. +#' @param name a character string with the new table name of the object. +#' @param title a character string with the new title of the object. +#' @param description a character string with the new description of the object. +#' @family storage +#' @export +#' @importFrom assertthat assert_that has_name +update_description <- function( + file, root = ".", field_description, name, title, description +) { + root <- normalizePath(root, winslash = "/", mustWork = TRUE) + file <- clean_data_path(root = root, file = file) + is_git2rmeta( + file = remove_root(file = file["meta_file"], root = root), root = root, + message = "error" + ) + old <- read_yaml(file["meta_file"]) + class(old) <- "meta_list" + if (!missing(field_description)) { + assert_that( + is.character(field_description), length(field_description) > 0, + !has_name(field_description, "..generic") + ) + stopifnot( + "names in `field_description` don't match variable names" = + all(names(field_description) %in% names(old)) + ) + for (name in names(field_description)) { + old[[name]][["description"]] <- update_or_drop(field_description[[name]]) + } + } + + if (!missing(name)) { + old[["..generic"]][["name"]] <- update_or_drop(name) + } + + if (!missing(title)) { + old[["..generic"]][["title"]] <- update_or_drop(title) + } + + if (!missing(description)) { + old[["..generic"]][["description"]] <- update_or_drop(description) + } + + packageVersion("git2rdata") |> + as.character() -> old[["..generic"]][["git2rdata"]] + metadata_hash(old) -> old[["..generic"]][["hash"]] + write_yaml(old, file["meta_file"]) + return(invisible(NULL)) +} + +#' @importFrom assertthat assert_that is.string +update_or_drop <- function(x) { + assert_that(is.string(x)) + if (is.na(x) || x == "") { + return(NULL) + } else { + return(x) + } +} diff --git a/R/write_vc.R b/R/write_vc.R index 524b34c..50715ec 100644 --- a/R/write_vc.R +++ b/R/write_vc.R @@ -24,11 +24,6 @@ #' `strict = TRUE` returns an error and leaves the data and metadata as is. #' Defaults to `TRUE`. #' @param ... parameters used in some methods -#' @param description An optional named character vector containing a -#' description for the variables in `x`. -#' The names of the vector must match the column names of `x`. -#' When provided, the description is stored in the metadata. -#' You don't have to provide a description for all columns. #' @inheritParams meta #' @inheritParams utils::write.table #' @return a named vector with the file paths relative to `root`. The names @@ -40,15 +35,14 @@ #' column name in a `data.frame`. write_vc <- function( x, file, root = ".", sorting, strict = TRUE, optimize = TRUE, na = "NA", ..., - split_by, description = character(0) + split_by ) { UseMethod("write_vc", root) } #' @export write_vc.default <- function( - x, file, root, sorting, strict = TRUE, optimize = TRUE, na = "NA", ..., - description = character(0) + x, file, root, sorting, strict = TRUE, optimize = TRUE, na = "NA", ... ) { stop("a 'root' of class ", class(root), " is not supported", call. = FALSE) } @@ -64,7 +58,7 @@ write_vc.default <- function( #' @importFrom git2r hash write_vc.character <- function( x, file, root = ".", sorting, strict = TRUE, optimize = TRUE, - na = "NA", ..., split_by = character(0), description = character(0) + na = "NA", ..., split_by = character(0) ) { assert_that( inherits(x, "data.frame"), is.string(file), is.string(root), is.string(na), @@ -78,8 +72,7 @@ write_vc.character <- function( if (!file.exists(file["meta_file"])) { raw_data <- meta( - x, optimize = optimize, na = na, sorting = sorting, split_by = split_by, - description = description + x, optimize = optimize, na = na, sorting = sorting, split_by = split_by ) } else { tryCatch( @@ -94,7 +87,7 @@ write_vc.character <- function( class(old) <- "meta_list" raw_data <- meta( x, optimize = optimize, na = na, sorting = sorting, old = old, - strict = strict, split_by = split_by, description = description + strict = strict, split_by = split_by ) problems <- compare_meta(attr(raw_data, "meta"), old) if (length(problems)) { @@ -170,8 +163,7 @@ write_vc.character <- function( packageVersion("git2rdata") ) meta_data[["..generic"]][["data_hash"]] <- datahash(file["raw_file"]) - write_yaml(meta_data, file["meta_file"], - fileEncoding = "UTF-8") + write_yaml(meta_data, file["meta_file"], fileEncoding = "UTF-8") hashes <- remove_root(file = file, root = root) names(hashes) <- diff --git a/man/is_git2rdata.Rd b/man/is_git2rdata.Rd index d0c18c3..ff111a7 100644 --- a/man/is_git2rdata.Rd +++ b/man/is_git2rdata.Rd @@ -55,6 +55,8 @@ is_git2rdata("iris", root) Other internal: \code{\link{is_git2rmeta}()}, \code{\link{meta}()}, +\code{\link{print.git2rdata}()}, +\code{\link{summary.git2rdata}()}, \code{\link{upgrade_data}()} } \concept{internal} diff --git a/man/is_git2rmeta.Rd b/man/is_git2rmeta.Rd index dfdd7ea..f4143e3 100644 --- a/man/is_git2rmeta.Rd +++ b/man/is_git2rmeta.Rd @@ -58,6 +58,8 @@ is_git2rdata("iris", root) Other internal: \code{\link{is_git2rdata}()}, \code{\link{meta}()}, +\code{\link{print.git2rdata}()}, +\code{\link{summary.git2rdata}()}, \code{\link{upgrade_data}()} } \concept{internal} diff --git a/man/list_data.Rd b/man/list_data.Rd index a84b9d7..398dc6c 100644 --- a/man/list_data.Rd +++ b/man/list_data.Rd @@ -97,6 +97,7 @@ Other storage: \code{\link{relabel}()}, \code{\link{rename_variable}()}, \code{\link{rm_data}()}, +\code{\link{update_description}()}, \code{\link{verify_vc}()}, \code{\link{write_vc}()} } diff --git a/man/meta.Rd b/man/meta.Rd index cab561a..58bf948 100644 --- a/man/meta.Rd +++ b/man/meta.Rd @@ -13,23 +13,15 @@ \usage{ meta(x, ...) -\method{meta}{character}(x, na = "NA", optimize = TRUE, description = character(0), ...) +\method{meta}{character}(x, na = "NA", optimize = TRUE, ...) -\method{meta}{factor}( - x, - optimize = TRUE, - na = "NA", - index, - strict = TRUE, - description = character(0), - ... -) +\method{meta}{factor}(x, optimize = TRUE, na = "NA", index, strict = TRUE, ...) -\method{meta}{logical}(x, optimize = TRUE, description = character(0), ...) +\method{meta}{logical}(x, optimize = TRUE, ...) -\method{meta}{POSIXct}(x, optimize = TRUE, description = character(0), ...) +\method{meta}{POSIXct}(x, optimize = TRUE, ...) -\method{meta}{Date}(x, optimize = TRUE, description = character(0), ...) +\method{meta}{Date}(x, optimize = TRUE, ...) \method{meta}{data.frame}( x, @@ -38,7 +30,6 @@ meta(x, ...) sorting, strict = TRUE, split_by = character(0), - description = character(0), ... ) } @@ -53,12 +44,6 @@ meta(x, ...) If \code{FALSE}, \code{meta()} converts the data to character. Defaults to \code{TRUE}.} -\item{description}{An optional named character vector containing a -description for the variables in \code{x}. -The names of the vector must match the column names of \code{x}. -When provided, the description is stored in the metadata. -You don't have to provide a description for all columns.} - \item{index}{An optional named vector with existing factor indices. The names must match the existing factor levels. Unmatched levels from \code{x} will get new indices.} @@ -128,6 +113,8 @@ meta(as.Date("2019-02-01"), optimize = FALSE) Other internal: \code{\link{is_git2rdata}()}, \code{\link{is_git2rmeta}()}, +\code{\link{print.git2rdata}()}, +\code{\link{summary.git2rdata}()}, \code{\link{upgrade_data}()} } \concept{internal} diff --git a/man/print.git2rdata.Rd b/man/print.git2rdata.Rd index b1a81f6..4436c28 100644 --- a/man/print.git2rdata.Rd +++ b/man/print.git2rdata.Rd @@ -14,3 +14,12 @@ \description{ Prints the data and the description of the columns when available. } +\seealso{ +Other internal: +\code{\link{is_git2rdata}()}, +\code{\link{is_git2rmeta}()}, +\code{\link{meta}()}, +\code{\link{summary.git2rdata}()}, +\code{\link{upgrade_data}()} +} +\concept{internal} diff --git a/man/prune_meta.Rd b/man/prune_meta.Rd index 2026ec8..9fdc254 100644 --- a/man/prune_meta.Rd +++ b/man/prune_meta.Rd @@ -111,6 +111,7 @@ Other storage: \code{\link{relabel}()}, \code{\link{rename_variable}()}, \code{\link{rm_data}()}, +\code{\link{update_description}()}, \code{\link{verify_vc}()}, \code{\link{write_vc}()} } diff --git a/man/read_vc.Rd b/man/read_vc.Rd index b7a7eb1..b81912d 100644 --- a/man/read_vc.Rd +++ b/man/read_vc.Rd @@ -96,6 +96,7 @@ Other storage: \code{\link{relabel}()}, \code{\link{rename_variable}()}, \code{\link{rm_data}()}, +\code{\link{update_description}()}, \code{\link{verify_vc}()}, \code{\link{write_vc}()} } diff --git a/man/relabel.Rd b/man/relabel.Rd index f37e063..0013244 100644 --- a/man/relabel.Rd +++ b/man/relabel.Rd @@ -87,6 +87,7 @@ Other storage: \code{\link{read_vc}()}, \code{\link{rename_variable}()}, \code{\link{rm_data}()}, +\code{\link{update_description}()}, \code{\link{verify_vc}()}, \code{\link{write_vc}()} } diff --git a/man/rename_variable.Rd b/man/rename_variable.Rd index 0c78e42..7172db2 100644 --- a/man/rename_variable.Rd +++ b/man/rename_variable.Rd @@ -85,6 +85,7 @@ Other storage: \code{\link{read_vc}()}, \code{\link{relabel}()}, \code{\link{rm_data}()}, +\code{\link{update_description}()}, \code{\link{verify_vc}()}, \code{\link{write_vc}()} } diff --git a/man/rm_data.Rd b/man/rm_data.Rd index 863db48..6b7331e 100644 --- a/man/rm_data.Rd +++ b/man/rm_data.Rd @@ -127,6 +127,7 @@ Other storage: \code{\link{read_vc}()}, \code{\link{relabel}()}, \code{\link{rename_variable}()}, +\code{\link{update_description}()}, \code{\link{verify_vc}()}, \code{\link{write_vc}()} } diff --git a/man/summary.git2rdata.Rd b/man/summary.git2rdata.Rd index 03943b9..e135857 100644 --- a/man/summary.git2rdata.Rd +++ b/man/summary.git2rdata.Rd @@ -15,3 +15,12 @@ Prints the summary of the data and the description of the columns when available. } +\seealso{ +Other internal: +\code{\link{is_git2rdata}()}, +\code{\link{is_git2rmeta}()}, +\code{\link{meta}()}, +\code{\link{print.git2rdata}()}, +\code{\link{upgrade_data}()} +} +\concept{internal} diff --git a/man/update_description.Rd b/man/update_description.Rd new file mode 100644 index 0000000..9ec4330 --- /dev/null +++ b/man/update_description.Rd @@ -0,0 +1,53 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/update_description.R +\name{update_description} +\alias{update_description} +\title{Update the description of a \code{git2rdata} object} +\usage{ +update_description( + file, + root = ".", + field_description, + name, + title, + description +) +} +\arguments{ +\item{file}{the name of the git2rdata object. Git2rdata objects cannot +have dots in their name. The name may include a relative path. \code{file} is a +path relative to the \code{root}. +Note that \code{file} must point to a location within \code{root}.} + +\item{root}{The root of a project. Can be a file path or a \code{git-repository}. +Defaults to the current working directory (\code{"."}).} + +\item{field_description}{a named character vector with the new descriptions +for the fields. +The names of the vector must match the variable names.} + +\item{name}{a character string with the new table name of the object.} + +\item{title}{a character string with the new title of the object.} + +\item{description}{a character string with the new description of the object.} +} +\description{ +Allows to update the description of the fields, the table name, the title, +and the description of a \code{git2rdata} object. +All arguments are optional. +Setting an argument to \code{NA} or an empty string will remove the corresponding +field from the metadata. +} +\seealso{ +Other storage: +\code{\link{list_data}()}, +\code{\link{prune_meta}()}, +\code{\link{read_vc}()}, +\code{\link{relabel}()}, +\code{\link{rename_variable}()}, +\code{\link{rm_data}()}, +\code{\link{verify_vc}()}, +\code{\link{write_vc}()} +} +\concept{storage} diff --git a/man/upgrade_data.Rd b/man/upgrade_data.Rd index 8f90cb7..b103ead 100644 --- a/man/upgrade_data.Rd +++ b/man/upgrade_data.Rd @@ -66,6 +66,8 @@ upgrade_data(path = ".", root = root) Other internal: \code{\link{is_git2rdata}()}, \code{\link{is_git2rmeta}()}, -\code{\link{meta}()} +\code{\link{meta}()}, +\code{\link{print.git2rdata}()}, +\code{\link{summary.git2rdata}()} } \concept{internal} diff --git a/man/verify_vc.Rd b/man/verify_vc.Rd index 022af43..3caf2f9 100644 --- a/man/verify_vc.Rd +++ b/man/verify_vc.Rd @@ -30,6 +30,7 @@ Other storage: \code{\link{relabel}()}, \code{\link{rename_variable}()}, \code{\link{rm_data}()}, +\code{\link{update_description}()}, \code{\link{write_vc}()} } \concept{storage} diff --git a/man/write_vc.Rd b/man/write_vc.Rd index 7924c38..fd6b618 100644 --- a/man/write_vc.Rd +++ b/man/write_vc.Rd @@ -15,8 +15,7 @@ write_vc( optimize = TRUE, na = "NA", ..., - split_by, - description = character(0) + split_by ) \method{write_vc}{character}( @@ -28,8 +27,7 @@ write_vc( optimize = TRUE, na = "NA", ..., - split_by = character(0), - description = character(0) + split_by = character(0) ) \method{write_vc}{git_repository}( @@ -81,12 +79,6 @@ Defaults to \code{TRUE}.} This creates a separate file for every combination. We prepend these variables to the vector of \code{sorting} variables.} -\item{description}{An optional named character vector containing a -description for the variables in \code{x}. -The names of the vector must match the column names of \code{x}. -When provided, the description is stored in the metadata. -You don't have to provide a description for all columns.} - \item{stage}{Logical value indicating whether to stage the changes after writing the data. Defaults to \code{FALSE}.} @@ -174,6 +166,7 @@ Other storage: \code{\link{relabel}()}, \code{\link{rename_variable}()}, \code{\link{rm_data}()}, +\code{\link{update_description}()}, \code{\link{verify_vc}()} } \concept{storage}