Skip to content
Prev 296154 / 398503 Next

Remove columns from dataframe based on their statistics

On Thu, May 31, 2012 at 8:52 AM, J Toll <jctoll at gmail.com> wrote:

            
Here's a similar method employing a more functional approach:

df[, apply(df, 2, function(x) length(unique(x)) > 1)]


James