Bert,
Is it important that you end up with a data frame? If not, it would be
very easy to generate a list with the unique values for each column. For
example:
df <- data.frame(v1 = sample(5, 20, T), v2 = sample(7, 20, T),
v3 = sample(9, 20, T), v4 = sample(11, 20, T))
lapply(df, uniq
Hi,
I was wondering what the best way is to create a new dataframe based on an
existing dataframe with only the unique available levels for each column (22
columns in total) in it.
If some columns have less unique values than others, then those columns can
be filled with blanks for the remaining
2 matches
Mail list logo