r - Remove duplicated rows -


i have read csv file r data.frame. of rows have same element in 1 of columns. remove rows duplicates in column. example:

platform_external_dbus          202           16                     google        1 platform_external_dbus          202           16         space-ghost.verbum        1 platform_external_dbus          202           16                  localhost        1 platform_external_dbus          202           16          users.sourceforge        8 platform_external_dbus          202           16                    hughsie        1 

i 1 of these rows since others have same data in first column.

just isolate data frame columns need, use unique function :d

# in above example, need first 3 columns deduped.data <- unique( yourdata[ , 1:3 ] ) # fourth column no longer 'distinguishes' them,  # they're duplicates , thrown out. 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -