R/create_glue_df.R

Defines functions create_glue_df

create_glue_df <- function(x,
                           glue = "",
                           rows = 1) {

  return(
    stats::setNames(
      as.data.frame(
        matrix(
          rep(
            glue,
            rows * ncol(x)
          ),
          ncol = ncol(x)
        )
      ),
      names(x)
    )
  );

}

Try the rock package in your browser

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

rock documentation built on Dec. 28, 2022, 1:55 a.m.