R/getFlatMatrix.R

Defines functions getFlatMatrix

getFlatMatrix <- function(
  df
) {
  res = matrix("", nrow(df), ncol(df))
  for(i in 1:ncol(df)) {
    dfi = unlist(lapply(df[, i], paste, collapse=","))
    res[, i] = dfi
  }
  colnames(res) = colnames(df)
  res
}

Try the RMixpanel package in your browser

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

RMixpanel documentation built on May 1, 2019, 10:46 p.m.