Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In ald_demo, column id_company should be unique by name_company and sector #232

Closed
jdhoffa opened this issue Jun 10, 2021 · 0 comments · Fixed by #235
Closed

In ald_demo, column id_company should be unique by name_company and sector #232

jdhoffa opened this issue Jun 10, 2021 · 0 comments · Fixed by #235
Labels
bug an unexpected problem or unintended behavior

Comments

@jdhoffa
Copy link
Member

jdhoffa commented Jun 10, 2021

See reprex below:

library(dplyr)
#> 
#> Attaching package: 'dplyr'
#> The following objects are masked from 'package:stats':
#> 
#>     filter, lag
#> The following objects are masked from 'package:base':
#> 
#>     intersect, setdiff, setequal, union
library(r2dii.data)

ald_demo %>% 
  dplyr::select(id_company, name_company, sector) %>% 
  unique() %>% 
  dplyr::filter(duplicated(id_company))
#> # A tibble: 89 x 3
#>    id_company name_company                  sector     
#>    <chr>      <chr>                         <chr>      
#>  1 30         beijing energy holding co ltd power      
#>  2 52         centrica plc                  power      
#>  3 53         cercl mining bv               oil and gas
#>  4 56         china shenhua energy co ltd   power      
#>  5 60         cias asociadas petroleras sa  power      
#>  6 85         drummond co inc               power      
#>  7 90         ecopetrol sa                  power      
#>  8 99         essar energy ltd              power      
#>  9 99         essar energy ltd              oil and gas
#> 10 102        federation of malaysia        oil and gas
#> # … with 79 more rows

Created on 2021-06-10 by the reprex package (v2.0.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants