dedupe: Removes duplicate observations within collected data

Description Usage Arguments Value Examples

View source: R/dedupe.R

Description

Removes duplicate observations within collected data

Usage

1
dedupe(df, col_name)

Arguments

df

object containing data frame of collected data

col_name

variable within data frame by which to filter for duplicate values

Value

Returns table of all data based on unique values within collected data

Examples

1
2
aldupe <- rsamp(df=albania, n=390, rep=TRUE)
dedupe(df=aldupe, col_name=qvKod)

Example output

# A tibble: 374 x 45
# Groups:   qvKod [374]
   qarku  Q_ID bashkia BAS_ID zaz   njesiaAdministrCOM_ID qvKod zgjedhes
   <fct> <int> <fct>    <int> <fct> <fct>             <int> <fct>    <int>
 1 Tira11 "Tiran…    111 ZAZ … "Tirane - Njesi11215 "\"1…      834
 2 Tira…    11 "Kamez"    112 ZAZ … "Paskuqan"        11210 "\"2…      996
 3 Durr…     3 "Durre31 ZAZ"Durres "          3101 "\"1…      889
 4 Fier      5 "Malla55 ZAZ"Qender - MALLA…   5308 "\"3…      488
 5 Tira…    11 "Tiran111 ZAZ"Farke"           11205 "\"2…      632
 6 Durr…     3 "Durre31 ZAZ"Manez"            3106 "\"1…      575
 7 Lezhe     9 "Lezhe"     92 ZAZ … "Shengjin"         9207 "\"0…      917
 8 Korce     7 "Korce"     73 ZAZ … "Korce"            7303 "\"3…      809
 9 Lezhe     9 "Mirdi94 ZAZ"Rreshen"          9305 "\"0…      518
10 Fier      5 "Fier "     52 ZAZ … "Dermenas"         5102 "\"3…      783
# … with 364 more rows, and 36 more variables: meshkuj <int>, femra <int>,
#   totalSeats <int>, vendndodhja <fct>, ambienti <fct>, totalVoters <int>,
#   femVoters <int>, maleVoters <int>, unusedBallots <int>,
#   damagedBallots <int>, ballotsCast <int>, invalidVotes <int>,
#   validVotes <int>, lsi <int>, ps <int>, pkd <int>, sfida <int>, pr <int>,
#   pd <int>, pbdksh <int>, adk <int>, psd <int>, ad <int>, frd <int>,
#   pds <int>, pdiu <int>, aak <int>, mega <int>, pksh <int>, apd <int>,
#   libra <int>, psSeats <int>, pdSeats <int>, lsiSeats <int>, pdiuSeats <int>,
#   psdSeats <int>

sampler documentation built on Sept. 15, 2019, 5:02 p.m.