Skip to content

Commit

Permalink
POG solution hopefully closes #7
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreaSanchezTapia committed Apr 3, 2021
1 parent ef3d7af commit 486ef7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions R/check_flora.R
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ check_flora <- function(species,
api <- "http://servicos.jbrj.gov.br/flora/taxon/"
search_sp <- gsub(" ", "%20", x)
res <- jsonlite::fromJSON(paste0(api, search_sp))
sp <- paste(res$result$genus, res$result$specificepithet)
cual <- which(sp == x)
res$result <- res$result[cual,]
return(res)
}

Expand Down

0 comments on commit 486ef7c

Please sign in to comment.