R/bootsample.R

Defines functions bootsample

Documented in bootsample

#' bootsample
#'
#' @param data a dataset to be bootstrapped
#' @param size the size of the bootstrap sample relative to the original sample
#'
#' @return a dataset
#' @export
#'
#' @examples X<-TestData()
#' Y<-bootsample(X)
bootsample<-function(data, size=1){
  return(as.matrix(data[sample.int(nrow(data),nrow(data)*size, replace = T),]))
}
okeep/Omisc documentation built on March 5, 2022, 12:32 a.m.