Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

unique_columns

Remove duplicated columns


Description

Drops duplicated columns from a data.frame (or other list-like object).

Usage

unique_columns(df)

Arguments

df

a data.frame

Value

data.frame without duplicated columns

Author(s)

References

Examples

df <- data.frame(a=1:10, b=1:10, c=2:11)

unique_columns(df)

stackoverflow

Stack Overflow's Greatest Hits

v0.7.0
CC BY-SA 4.0
Authors
Neal Fultz <nfultz@gmail.com> and the StackOverflow.com community
Initial release
2020-01-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.