R/set_names.R

Defines functions set_names unset_row_names

Documented in set_names unset_row_names

#' Set names
#'
#' Add names with a parenthetical function.
#'
#' @param x Data object
#' @param nms Names to assign object.
#' @export
set_names <- function(x, nms) {
  `names<-`(x, nms)
}

#' Unset row names
#'
#' Unset row names with a parenthetical function.
#'
#' @param x Data object
#' @export
unset_row_names <- function(x) {
  `row.names<-`(x, NULL)
}

Try the tfse package in your browser

Any scripts or data that you put into this service are public.

tfse documentation built on May 2, 2019, 11:28 a.m.