Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #194

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions R/create_attributes_table.R
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ table_to_r <- function(table) {
table_colnames <- table$colnames
out <- do.call(rbind, lapply(table_data, rbind))

# Change NULL to NA in list
out[sapply(out, is.null)] <- NA
# Change NULL to empty string in list
out[sapply(out, is.null)] <- ""

if (nrow(out) > 1) {
out <- as.data.frame(apply(out, 2, unlist), stringsAsFactors = FALSE)
Expand All @@ -565,6 +565,9 @@ table_to_r <- function(table) {
}

colnames(out) <- table_colnames
# Convert empty strings to missing values
out[sapply(out, function(f){(f == '')})] <- NA

out
}

Expand Down Expand Up @@ -621,7 +624,7 @@ build_factors <- function(att_table, data) {
en_data <- lapply(seq_along(en_data), function(i) {
attributeName <- colnames(en_data)[i]
code <- unique(en_data[, i])
definition <- NA
definition <- ""
out <- data.frame(attributeName, code, definition, stringsAsFactors = FALSE)
colnames(out) <- c("attributeName", "code", "definition")
out <- out[!is.na(code),]
Expand Down
12 changes: 6 additions & 6 deletions R/obsolete_package.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#' [arcticdatautils::publish_update()] should be used.
#'
#' @param mn (MNode) The DataONE member node.
#' @param metadata_obsolete (character) The metadata PID of the old, or broken, version. Any
#' metadata PID from the obsolete version chain can be used - sets the PID to the
#' end of the version chain.
#' @param metadata_new (character) The metadata PID of the new version. Any metadata
#' PID from the new version chain can be used - sets the PID to the beginning of
#' the version chain.
#' @param metadata_obsolete (character) The metadata PID of the old, or broken, version.
#' Sets the PID to the beginning of the version chain (the entry at index=1 of the vector
#' returned by \code{arcticdatautils::get_all_versions}.
#' @param metadata_new (character) The metadata PID of the new version. Sets the PID to
#' the end of the version chain (the last item in the vector returned by
#' \code{arcticdatautils::get_all_versions}).
#'
#' @return (logical) `TRUE`/`FALSE`
#'
Expand Down
12 changes: 6 additions & 6 deletions man/obsolete_package.Rd

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