# INBO CODING CLUB
25 January 2022
Welcome!
## Share your code snippet
If you want to share your code snippet, copy paste your snippet within a section of three backticks (```):
As an **example**:
```
library(tidyverse)
```
(*you can copy paste this example and add your code further down*)
## Yellow sticky notes
No yellow sticky notes online. Put your name + " | " and add a "*" each time you solve a challenge (see below).
## Participants
Name | Challenges
--- | ---
Damiano Oldoni | ***
Hans Van Calster | ***
An Leyssen |*
joost vanoverbeke |
Raïsa Carmen |***
Alexander Van Braeckel|*
Emily Veltjen |*
Els Lommelen |***
Gunther Van Ryckegem |*
Bram D'hondt | *
Marijke Thoonen | **
## Challenge 1
alexander: dl 3 : TRUE FALSE field
Bram : bit = true (1) vs. false (0)
## Challenge 2
Joost:
```r
locs %>%
distinct(area_code) %>%
count()
```
Bram :
locations <- get_locs(con_watina)
locations2 <- as.data.frame(locations)
uniekeareas <- locations2 %>%
summarise(yoyo = n_distinct(area_code))
ANTWOORD : 341
MAAR NIET LAZY... :-/
Gunther
area_code <- get_locs(watina) %>%
n_distinct(area_code)
waarom werkt dat niet?
omdat n_distinct() werkt op een vector en het is een afkorting voor
length(unique(x)) met x een vector.
Dit werkt dus:
n_distinct(locations2$area_code)
## Challenge 3
tbl(src = con_florabank, "tblTaxon") %>%
filter(NaamNederlands == "Slank snavelmos") %>%
select(NaamWetenschappelijk)