Learn R Programming

ddpcr (version 1.15.2)

lol_to_df: 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

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

Run the code above in your browser using DataLab