How to find maximum string length by column in data frame

Viewed 19446

My question is similar to this. But for strings.

So I have a dataframe, each column contains strings of different length. So, how I can find the maximum string length per column?

Then, how to select the columns, where length is > 1, by sapply or similar.

A typical column of the dataframe looks like this:

clmn=c("XDX", "GUV", "FQ", "ACUE", "HIT", "AYX", "NFD", "AHBW", "GKQ", "PYF")

Thanks

1 Answers
Related