You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -120,7 +120,7 @@ Number of occurrences linked to taxa with higher rank than species:
120
120
121
121
```{r occs_higher_rank_than_species}
122
122
occ_cube_species %>%
123
-
filter(speciesKey == 0) %>%
123
+
filter(speciesKey == 0 | is.na(speciesKey)) %>%
124
124
select(n) %>%
125
125
colSums()
126
126
```
@@ -130,14 +130,14 @@ We will discard them:
130
130
```{r remove_occs_with_higher_rank}
131
131
occ_cube_species <-
132
132
occ_cube_species %>%
133
-
filter(speciesKey != 0)
133
+
filter(speciesKey != 0 & !is.na(speciesKey))
134
134
```
135
135
136
136
## Map taxa
137
137
138
-
Grouping by `speciesKey`, we loose informations about which taxa share the same `speciesKey`. This information could be sometimes helpful. We extract it in a separate data.frame, `taxa_species`.
138
+
Grouping by `speciesKey`, we loose informations about which taxa share the same `speciesKey`. This information could be sometimes helpful. We extract it in a separate data.frame, `taxa_species`.
139
139
140
-
For speeding up the extraction, we create an index on `speciesKey`,`taxonKey` and `scientificName` if not present:
140
+
For speeding up the extraction, we create an index on `speciesKey`, `taxonKey` and `scientificName` if not present:
We create `taxa_species` by adding the taxonomic rank, `SPECIES`, and the taxonomic status of the species, one of `ACCEPTED` or `DOUBTFUL`, and create a column called `include` which contains all taxa whose occurrences are linked to the species:
230
+
We create `taxa_species` by adding the taxonomic rank, `SPECIES`, and the taxonomic status of the species, one of `ACCEPTED` or `DOUBTFUL`, and create a column called `include` which contains all taxa whose occurrences are linked to the species:
0 commit comments