library(rcoleo) library(purrr) all_taxa <- get_species() #> Data retrieval 5.88% Data retrieval 11.8% Data retrieval 17.6% Data retrieval 23.5% Data #> retrieval 29.4% Data retrieval 35.3% Data retrieval 41.2% Data retrieval 47.1% Data retrieval #> 52.9% Data retrieval 58.8% Data retrieval 64.7% Data retrieval 70.6% Data retrieval 76.5% #> Data retrieval 82.4% Data retrieval 88.2% Data retrieval 94.1% Data retrieval 100% all_taxa_df <- map_df(all_taxa[[1]], 1) #> Error: All columns in a tibble must be vectors. #> x Column `response` is a `response` object. knitr::kable(head(all_taxa_df)) #> Error in head(all_taxa_df): object 'all_taxa_df' not found dim(all_taxa_df) #> Error in eval(expr, envir, enclos): object 'all_taxa_df' not found
library(rcoleo) library(purrr) library(tidyverse) #> ── Attaching packages ──────────────────────────────────────────────────── tidyverse 1.3.0 ── #> ✓ ggplot2 3.3.2 ✓ readr 1.3.1 #> ✓ tibble 3.0.3 ✓ stringr 1.4.0 #> ✓ tidyr 1.1.0 ✓ forcats 0.5.0 #> Warning: package 'tibble' was built under R version 4.0.2 #> ── Conflicts ─────────────────────────────────────────────────────── tidyverse_conflicts() ── #> x dplyr::filter() masks stats::filter() #> x dplyr::lag() masks stats::lag() all_sites <- get_sites() #> Data retrieval 100% #> ``` ```r # on extract le body donnees <- all_sites[[1]][[1]]$body pap <- select(donnees, cell.name, milieu=type, campaigns) %>% unnest(campaigns) %>% filter(type == "papilionidés") #> Warning: `select_()` is deprecated as of dplyr 0.7.0. #> Please use `select()` instead. #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_warnings()` to see where this warning was generated. #> Error in UseMethod("select_"): no applicable method for 'select_' applied to an object of class "NULL" knitr::kable(head(pap)) #> Error in head(pap): object 'pap' not found
Is this supposed to work??!
all_site_pap <- get_obs(site_id = "", type = "papilionidés") #> Data retrieval 100% #> Warning: `as.tibble()` is deprecated as of tibble 2.0.0. #> Please use `as_tibble()` instead. #> The signature and semantics have changed, see `?as_tibble`. #> This warning is displayed once every 8 hours. #> Call `lifecycle::last_warnings()` to see where this warning was generated. #> Warning: Unknown or uninitialised column: `id`. #> Error in strsplit(httr::headers(resp)$"content-range", split = "\\D"): non-character argument all.equal(one_site_pap[[1]][[1]]$body, all_site_pap[[1]][[1]]$body) #> Error in all.equal(one_site_pap[[1]][[1]]$body, all_site_pap[[1]][[1]]$body): object 'one_site_pap' not found pap_df <- all_site_pap %>% map_df(~ .x[[1]][["body"]]) #> Error in eval(lhs, parent, parent): object 'all_site_pap' not found knitr::kable(pap_df) #> Error in knitr::kable(pap_df): object 'pap_df' not found ## write.csv(pap_df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.