R/rep.r

Defines functions rep.float32

Documented in rep.float32

#' rep
#' 
#' Replicate elements of a float vector/matrix.
#' 
#' @param x
#' A float matrix.
#' @param ...
#' Additional arguments (passed to \code{base::rep}).
#'  
#' @return 
#' A float vector.
#' 
#' @examples
#' library(float)
#' x = fl(matrix(1:6, 3, 2))
#' 
#' rep(x, 5)
#' 
#' @name rep
#' @rdname rep
NULL



#' @rdname rep
#' @export
rep.float32 = function(x, ...)
{
  x_rep = rep(DATA(x), ...)
  float32(x_rep)
}

Try the float package in your browser

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

float documentation built on Feb. 16, 2023, 6:43 p.m.