x <- list(
A = c(a = 1, b = 2, c = 3),
B = list(
a = c(x = 10, y = 20),
b = c(x = 11, y = 21),
c = c(x = 12, y = 22)
),
bad = c(a = 1, b = 2) # wrong length -> excluded
)
df <- list_to_df_expand(x)
df
attr(df, "dropped")
# Use row names instead of a category column:
df2 <- list_to_df_expand(x, category_col = NULL)
df2
# Disable storing excluded elements:
df3 <- list_to_df_expand(x, dropped_attr = NULL)
df3
Run the code above in your browser using DataLab