R/emptydf.R

Defines functions emptydf

Documented in emptydf

#' Helper function that creates an empty data.frame
#'
#' @param nrow Number of rows
#' @param ncol Number of columns
#' @param names Number of names of the columns
#' @return A data frame of NAs, with the given column names
#' @export
#'
emptydf <- function(nrow, ncol, names) {
    stats::setNames(data.frame(matrix(NA_character_, nrow = nrow, ncol = ncol),
                               stringsAsFactors = FALSE), names)
}

Try the pyMTurkR package in your browser

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

pyMTurkR documentation built on Nov. 25, 2021, 9:07 a.m.