ourMELONS/R/blanks.R
Waldir Leoncio fca9caa731 Restyled files
Ran through styler::style_dir() in the R and tests directories in preparation for #23.
2021-11-10 14:25:50 +01:00

14 lines
392 B
R

#' @title Blanks
#' @description Create character vector of blanks
#' @details This function emulates the behavior of a homonimous function from Matlab
#' @param n length of vector
#' @return Vector of n blanks
#' @author Waldir Leoncio
#' @export
blanks <- function(n) {
if (n < 0) {
warning("Negative n passed. Treating as n = 0")
n <- 0
}
paste(rep(" ", n), collapse = "")
}