lol_to_df: Convert a list of lists returned from vapply to a dataframe

View source: R/utils.R

lol_to_dfR Documentation

Convert a list of lists returned from vapply to a dataframe

Description

When running a vapply function and each element returns a list with multiple values, the return value is a list of lists. This function can be used to convert that return value into a data.frame.

Usage

lol_to_df(lol, name = "well")

Arguments

lol

List of lists that is a result of a vapply

name

Column name to use for the name of each list

See Also

named_vec_to_df

Examples

vapply(c("a", "b", "c"),
       function(x) list(low = x, up = toupper(x)),
       list(character(1), character(1))) %>%
  lol_to_df("key")

daattali/ddpcr documentation built on March 27, 2024, 6:50 a.m.