Repeat each row of data.frame the number of times specified in a column
df <- data.frame(var1 = c(‘a’, ‘b’, ‘c’), var2 = c(‘d’, ‘e’, ‘f’), freq = 1:3) What is the simplest way to expand each … Read more
df <- data.frame(var1 = c(‘a’, ‘b’, ‘c’), var2 = c(‘d’, ‘e’, ‘f’), freq = 1:3) What is the simplest way to expand each … Read more
I want to create a series of lists, all of varying lengths. Each list will contain the same element e, repeated n times … Read more