diff --git a/404.html b/404.html index 1049fce..fd44469 100644 --- a/404.html +++ b/404.html @@ -6,23 +6,23 @@ Page not found (404) • letsR - - - + + + - + - Skip to contents + Skip to contents
diff --git a/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html b/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html index 2cb908c..9082e70 100644 --- a/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html +++ b/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html @@ -87,7 +87,7 @@ in GBIF. However, analyzing this type of data often requires transforming the spatial distribution of species into a presence-absence matrix or a grid format. In this tutorial, we will guide you through a -straightforward process using the R package letsR, +straightforward process using the R package letsR, authored by Bruno Vilela and Fabricio Villalobos.

IUCN shapefiles diff --git a/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based_files/figure-html/unnamed-chunk-16-1.png b/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based_files/figure-html/unnamed-chunk-16-1.png index aa98c37..3319fc3 100644 Binary files a/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based_files/figure-html/unnamed-chunk-16-1.png and b/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based_files/figure-html/unnamed-chunk-16-1.png differ diff --git a/articles/species-level-macroecological-analysis.html b/articles/species-level-macroecological-analysis.html index 0271aa8..d3eef89 100644 --- a/articles/species-level-macroecological-analysis.html +++ b/articles/species-level-macroecological-analysis.html @@ -82,9 +82,9 @@ -

In another post, I have shown how to use letsR +

In another post, I have shown how to use letsR to analyze species traits at the community level. But, in many cases -this type of analysis can lead to spurious patterns (click +this type of analysis can lead to spurious patterns (click here for further discussion on this issue). An alternative can be analyzing the data at the species-level. In this post, I will show two examples on how to make macroecological analysis at the species level diff --git a/authors.html b/authors.html index a84e6f3..66826e0 100644 --- a/authors.html +++ b/authors.html @@ -68,13 +68,21 @@

Authors

Citation

Source: inst/CITATION

-

Bruno Vilela and Fabricio Villalobos (2015). letsR: a new R package for data handling and analysis in macroecology. Methods in Ecology and Evolution. DOI: 10.1111/2041-210X.12401.

+

Vilela B, Villalobos F (2015). +“letsR: a new R package for data handling and analysis in macroecology.” +Methods in Ecology and Evolution, 6(10), -5. +doi:10.1111/2041-210X.12401, https://besjournals.onlinelibrary.wiley.com/doi/abs/10.1111/2041-210X.12401. +

@Article{,
-  title = {letsR: a new R package for data handling and analysis in macroecology},
+  title = {letsR: a new R package for data handling and               analysis in macroecology},
+  author = {Bruno Vilela and Fabricio Villalobos},
   journal = {Methods in Ecology and Evolution},
-  author = {{Bruno Vilela} and {Fabricio Villalobos}},
   year = {2015},
-  url = {https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/2041-210X.12401},
+  volume = {6},
+  number = {10},
+  pages = {-5},
+  url = {https://besjournals.onlinelibrary.wiley.com/doi/abs/10.1111/2041-210X.12401},
+  doi = {10.1111/2041-210X.12401},
 }

Install @@ -150,7 +150,7 @@

Dev status

  • CRAN_Status_Badge
  • rstudio mirror downloads
  • rstudio mirror downloads
  • -
  • Research software impact
  • +
  • Research software impact
  • diff --git a/pkgdown.yml b/pkgdown.yml index b3e3b28..3df879f 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -8,8 +8,8 @@ articles: mapping-species-traits: mapping-species-traits.html save-load-presenceabsence: save-load-presenceabsence.html species-level-macroecological-analysis: species-level-macroecological-analysis.html -last_built: 2023-11-22T19:36Z +last_built: 2023-11-22T20:22Z urls: - reference: http://brunovilela.github.io/letsR/reference - article: http://brunovilela.github.io/letsR/articles + reference: https://brunovilela.github.io/letsR/reference + article: https://brunovilela.github.io/letsR/articles diff --git a/reference/temp.html b/reference/temp.html index 48cebfc..ada05d7 100644 --- a/reference/temp.html +++ b/reference/temp.html @@ -1,9 +1,9 @@ Avarege temperature raster for the world. — temp • letsRAvarege temperature raster for the world. — temp • letsR @@ -60,7 +60,7 @@

    Average temperature raster in Celsius degrees(multiplied by 100) for the world in 10 arc min of resolution. Data was modfied from -WorldClim (http://worldclim.com/, downloaded in 05/2014).

    +WorldClim (https://worldclim.com/, downloaded in 05/2014).

    diff --git a/reference/wrld_simpl.html b/reference/wrld_simpl.html index b8e4efb..40f8ceb 100644 --- a/reference/wrld_simpl.html +++ b/reference/wrld_simpl.html @@ -68,7 +68,7 @@

    Usage

    Source

    Originally - “http://mappinghacks.com/data/TM_WORLD_BORDERS_SIMPL-0.2.zip”, + “https://mappinghacks.com/data/TM_WORLD_BORDERS_SIMPL-0.2.zip”, now available from https://github.com/nasa/World-Wind-Java/tree/master/WorldWind/testData/shapefiles

    diff --git a/search.json b/search.json index fb0fdd7..2f3b27d 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"http://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"iucn-shapefiles","dir":"Articles","previous_headings":"","what":"IUCN shapefiles","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"begin, download species distribution shapefiles IUCN website. can import data using terra::vect sf::st_read functions. purpose tutorial, utilizing distribution data frogs belonging Phyllomedusa genus, conveniently pre-loaded within letsR package. can plot data see looks like.","code":"library(letsR) data(\"Phyllomedusa\") # Plot ## Color settings and assignment colors <- rainbow(length(unique(Phyllomedusa$binomial)), alpha = 0.5) position <- match(Phyllomedusa$binomial, unique(Phyllomedusa$binomial)) colors <- colors[position] ## Plot call plot(sf::st_geometry(Phyllomedusa), col = colors, lty = 0, main = \"Spatial polygons of Phyllomedusa\") data(\"wrld_simpl\") plot(sf::st_geometry(wrld_simpl), add = TRUE)"},{"path":"http://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"quick-start","dir":"Articles","previous_headings":"IUCN shapefiles","what":"Quick start","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"Next step, can use function lets.presab convert species’ ranges (shapefile format) presence-absence matrix based user-defined grid system. simple way define extent resolution grid. Please aware working shapefiles containing numerous species opting high-resolution grid, function’s execution may become notably slow. instances, advisable monitor relative running time analysis enabling count = TRUE argument. lets.presab function yields PresenceAbsence object (unless show.matrix = TRUE, case presence-absence matrix returned). object essentially list comprising presence-absence matrix, raster containing geographical information, species names. additional details, refer ?PresenceAbsence. obtain summary information generated Presence-Absence Matrix (PAM), summary function can employed. can also use plot function directly PAM object. plot function also allow users plot specific species distributions. example, can plot map Phyllomedusa hypochondrialis: said , PAM object contains actual presence absence matrix, access can use following code: first two columns matrix contain longitude (x) latitude (y) cells’ centroid, following columns include species’ presence(1) absence(0) information.","code":"PAM <- lets.presab(Phyllomedusa, xmn = -93, xmx = -29, ymn = -57, ymx = 15, res = 1) summary(PAM) ## ## Class: PresenceAbsence ## _ _ ## Number of species: 32 ## Number of cells: 1187 ## Cells with presence: 1187 ## Cells without presence: 0 ## Species without presence: 0 ## Species with the largest range: Phyllomedusa hypochondrialis ## _ _ ## Grid parameters ## Resolution: 1, 1 (x, y) ## Extention: -93, -29, -57, 15 (xmin, xmax, ymin, ymax) ## Coord. Ref.: +proj=longlat +datum=WGS84 +no_defs plot(PAM) plot(PAM, name = \"Phyllomedusa hypochondrialis\") presab <- PAM$Presence_and_Absence_Matrix # Print only the first 5 rows and 3 columns presab[1:5, 1:3] ## Longitude(x) Latitude(y) Phyllomedusa araguari ## [1,] -74.5 11.5 0 ## [2,] -69.5 11.5 0 ## [3,] -68.5 11.5 0 ## [4,] -75.5 10.5 0 ## [5,] -74.5 10.5 0"},{"path":"http://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"using-different-projections","dir":"Articles","previous_headings":"IUCN shapefiles","what":"Using different projections","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"users may want use different projections generate presence absence matrix. lets.presab function allow users changing crs.grid argument. Check example using South America Equidistant Conic projection.","code":"pro <- paste(\"+proj=eqdc +lat_0=-32 +lon_0=-60 +lat_1=-5\", \"+lat_2=-42 +x_0=0 +y_0=0 +ellps=aust_SA\", \"+units=m +no_defs\") SA_EC <- terra::crs(pro) PAM_proj <- lets.presab(Phyllomedusa, xmn = -4135157, xmx = 4707602, ymn = -450000, ymx = 5774733, res = 100000, crs.grid = SA_EC) summary(PAM_proj) ## ## Class: PresenceAbsence ## _ _ ## Number of species: 32 ## Number of cells: 1396 ## Cells with presence: 1396 ## Cells without presence: 0 ## Species without presence: 0 ## Species with the largest range: Phyllomedusa hypochondrialis ## _ _ ## Grid parameters ## Resolution: 1e+05, 1e+05 (x, y) ## Extention: -4135157, 4664843, -450000, 5750000 (xmin, xmax, ymin, ymax) ## Coord. Ref.: +proj=eqdc +lat_0=-32 +lon_0=-60 +lat_1=-5 +lat_2=-42 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs plot(PAM_proj) # Add projected country boundaries data(\"wrld_simpl\") plot(sf::st_transform(sf::st_geometry(wrld_simpl), pro), add = TRUE)"},{"path":"http://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"other-features","dir":"Articles","previous_headings":"IUCN shapefiles","what":"Other features","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"function lets.presab useful arguments. instance, users may wish exclude regions species extinct retain breeding ranges. presence, origin, seasonal arguments enable users filter species distributions based IUCN classification different parts species’ range. find specific values arguments, consult IUCN metadata files. certain scenarios, proves advantageous consider species present cell covers specified percentage value. Users can customize threshold using cover argument. ’s important note initially, option exclusively available coordinates degrees (longitude/latitude). However, latest update GitHub, users can now employ cover argument projections well. Observing plot , ’s evident cells near continent’s border longer reflect presence species. generating multiple PresenceAbsence objects distinct groups, users might prefer maintain consistent grid. achieve , ’s crucial retain remove.cells = FALSE argument, preventing modification grid. Conversely, setting remove.cells = TRUE excludes cells value zero final matrix, meaning sites species present won’t included. can now employ summary function confirm whether empty cells retained. Additionally, users intending retain species occur cell grid, essential configure remove.sp = FALSE.","code":"# 90% cover PAM_90 <- lets.presab(Phyllomedusa, xmn = -93, xmx = -29, ymn = -57, ymx = 15, res = 1, cover = 0.9) plot(PAM_90) PAM_keep_cells <- lets.presab(Phyllomedusa, xmn = -93, xmx = -29, ymn = -57, ymx = 15, res = 1, remove.cells = FALSE) summary(PAM_keep_cells) ## ## Class: PresenceAbsence ## _ _ ## Number of species: 32 ## Number of cells: 4608 ## Cells with presence: 1187 ## Cells without presence: 3421 ## Species without presence: 0 ## Species with the largest range: Phyllomedusa hypochondrialis ## _ _ ## Grid parameters ## Resolution: 1, 1 (x, y) ## Extention: -93, -29, -57, 15 (xmin, xmax, ymin, ymax) ## Coord. Ref.: +proj=longlat +datum=WGS84 +no_defs"},{"path":"http://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"occurrence-data-e-g--gbif","dir":"Articles","previous_headings":"","what":"Occurrence data (e.g. GBIF)","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"Another prevalent source spatial data occurrence records. lets.presab.points function enables users input records, generating PresenceAbsence object. utilize function, ’ll need two-column matrix containing longitude latitude, along vector indicating species name occurrence record. example , going simulate random occurrence points. Now coordinates species name, can use lets.presab.points function.","code":"species <- c(rep(\"sp1\", 100), rep(\"sp2\", 100), rep(\"sp3\", 100), rep(\"sp4\", 100)) x <- runif(400, min = -69, max = -51) y <- runif(400, min = -23, max = -4) xy <- cbind(x, y) PAM_points <- lets.presab.points(xy, species, xmn = -93, xmx = -29, ymn = -57, ymx = 15) plot(PAM_points)"},{"path":"http://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"using-your-own-grid","dir":"Articles","previous_headings":"","what":"Using your own grid","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"different reasons users may want create presence absence matrix based grid shapefile format. function lets.presab.grid allow users convert species’ ranges presence-absence matrix based grid shapefile format. However, function returns actual matrix presence absence grid, PresenceAbsence object. situations possible convert result PresenceAbsence object, cover new post soon. Let’s first create grid: Now can build presence absence matrix grid. result list presence absence matrix grid. plot richness map can use following code: covers functions convert species distribution presence absence matrix using letsR package. Let know suggestion comments, please share like . cite letsR publications use: Bruno Vilela Fabricio Villalobos (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution. DOI: 10.1111/2041-210X.12401","code":"# Grid sp.r <- terra::as.polygons(terra::rast(xmin = -93, xmax = -29, ymin = -57, ymax = 15, resolution = 5)) # Give an ID to the cell sp.r$ID <- 1:length(sp.r) plot(sp.r, border = rgb(.5, .5, .5)) plot(sf::st_geometry(wrld_simpl[1]), add = T, fill = F) resu <- lets.presab.grid(Phyllomedusa, sp.r, \"ID\") rich_plus1 <- rowSums(resu$PAM[, -1]) + 1 colfunc <- colorRampPalette(c(\"#fff5f0\", \"#fb6a4a\", \"#67000d\")) colors <- c(\"white\", colfunc(max(rich_plus1))) plot(resu$grid, border = \"gray40\", col = colors[rich_plus1]) plot(sf::st_geometry(wrld_simpl), add = TRUE)"},{"path":"http://brunovilela.github.io/letsR/articles/Adding-variables-to-a-presenceabsence-object.html","id":"adding-variables-in-raster-format","dir":"Articles","previous_headings":"","what":"Adding variables in raster format","title":"Adding variables to a PresenceAbsence object","text":"add variables raster format PresenceAbsence object can use function lets.addvar letsR package. function takes raster object resolution extent, transform match information PresenceAbsence object. Subsequently, variables included additional columns containing aggregate/summarize value variable(s) cell presence-absence matrix. Let’s see example using bioclimatic data WorldClim. use Average temperature raster Celsius degrees (multiplied 100) world 10 arc min resolution. use PresenceAbsence object Phyllomedusa species previously generated. can now run lets.addvar function. Just make sure two objects projection using function. Also, note climatic data higher resolution PAM. case, choose function aggregate values argument fun. situations, people interested averaging values aggregate multiple cells, specific cases may want sum , get standard deviation, use another function. result presence absence matrix, last columns now include raster values. Check table: want coordinates species included can set argument onlyvar = TRUE. Now variables, can use relate species data many ways. example, graph relationship temperature species richness.","code":"library(letsR) data(temp) r <- terra::unwrap(temp) # example data plot(r) data(PAM) plot(PAM, main = \"Phyllomedusa\\nRichness\") PAM_env <- lets.addvar(PAM, r, fun = mean) head(PAM_env) climate <- lets.addvar(PAM, r, fun = mean, onlyvar = TRUE) head(climate) library(ggplot2) rich <- rowSums(PAM$P[, -(1:2)]) mpg1 <- data.frame(\"Temperature\" = climate[, 1]/10, \"Richness\" = rich) ggplot(mpg1, aes(Temperature, Richness)) + geom_smooth() + geom_point(col = rgb(0, 0, 0, .6)) + theme_bw()"},{"path":"http://brunovilela.github.io/letsR/articles/Adding-variables-to-a-presenceabsence-object.html","id":"adding-variables-in-polygon-format","dir":"Articles","previous_headings":"","what":"Adding variables in polygon format","title":"Adding variables to a PresenceAbsence object","text":"Data shapefile format like ecorregions, conservation units countries, can added PAM using function lets.addpoly. function adds polygons’ attributes columns right-end matrix. values represent percentage cell covered polygon attribute used. example, can use South America countries map available package maptools. Now can add variables PAM. information can used calculate number species per country example. cite letsR publications use: Bruno Vilela Fabricio Villalobos (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution. DOI: 10.1111/2041-210X.12401","code":"data(\"wrld_simpl\") SA <- c(\"Brazil\", \"Colombia\", \"Argentina\", \"Peru\", \"Venezuela\", \"Chile\", \"Ecuador\", \"Bolivia\", \"Paraguay\", \"Uruguay\", \"Guyana\", \"Suriname\", \"French Guiana\") south_ame <- wrld_simpl[wrld_simpl$NAME %in% SA, ] ggplot(data = south_ame) + geom_sf() + geom_sf_text(aes(label = ISO3)) + theme_bw() PAM_pol <- lets.addpoly(PAM, south_ame, \"NAME\") head(PAM_pol) vars_col <- (ncol(PAM$P) + 1):ncol(PAM_pol) n <- length(vars_col) rich_count <- numeric(n) for (i in 1:n) { rich_count[i] <- sum(colSums(PAM$P[PAM_pol[, vars_col[i]] > 0, -(1:2)]) > 0) } labs <- as.factor(colnames(PAM_pol)[vars_col]) names(rich_count) <- labs mpg <- data.frame(\"Richness\" = rich_count, \"Country\" = as.factor(labs)) g <- ggplot(mpg, aes(labs, Richness)) g + geom_bar(stat = \"identity\") + labs(x = \"\") + theme(axis.text.x = element_text(angle = 90, hjust = 1))"},{"path":"http://brunovilela.github.io/letsR/articles/mapping-species-traits.html","id":"community-level-analysis","dir":"Articles","previous_headings":"","what":"Community level analysis","title":"Mapping species traits: community level analysis","text":"map trait cell, can use lets.maplizer function. can choose function aggregate species trait per cell, case want use default option average values. also want function return raster mapped traits, set ras = TRUE. Visually, Rapoport’s rule doesn’t seem work Phyllomedusa frogs. can go see relationship latitude. Seems Rapoport’s rule doesn’t stand genus, actually direction seems inverted, least analyzing community level. However, confirm perform formal statistical analysis control spatial autocorrelation problems. quick note . Scientists careful type community analysis, repetition species co-occurrence can easily generate spurious patterns significant correlations (see paper discussion). cite letsR publications use: Bruno Vilela Fabricio Villalobos (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution. DOI: 10.1111/2041-210X.12401","code":"resu <- lets.maplizer(PAM, rangesize, rownames(rangesize), ras = TRUE) cols2 <- colorRampPalette(c('#e0ecf4','#9ebcda','#8856a7')) plot(resu$Raster, col = cols2(10), main = \"Mean Range Size\") data(\"wrld_simpl\") plot(sf::st_geometry(wrld_simpl), add = TRUE) library(ggplot2) mpg <- as.data.frame(resu$Matrix) f <- ggplot(mpg, aes(`Latitude(y)`, Variable_mean)) f + geom_smooth(model = lm) + geom_point(col = rgb(0, 0, 0, .6)) + labs(y = \"Range Size\") + theme_bw()"},{"path":"http://brunovilela.github.io/letsR/articles/species-level-macroecological-analysis.html","id":"example-1-species-level-test-of-rapoports-rule-on-phyllomedusa-frogs-","dir":"Articles","previous_headings":"","what":"Example 1: Species level test of Rapoport’s rule on Phyllomedusa frogs.","title":"Macroecological analysis at the species level","text":"first calculate species range size. can directly species shapefiles higher precision. second step calculate species geographical centroid/midpoint using function lets.midpoint. several ways calculate species geographic centroid, function offers several methods . species range circular continuous, methods provide answer. However, shape distributions start become complex, different methods provide different answers. example, use default option “PC” (polygon centroid). method generate polygon raster, calculate centroid polygon. can also plot geographical centroids. check Rapoport’s rule can plot latitude range size: , data indicate Rapoport’s rule apply Phyllomedusa genus. However, seems interesting pattern range size decreases center towards extremes group. effect niche conservatism, species extreme latitude face different conditions ancestral Phylllomedusa. Another possibility pattern due shape continent, extreme latitudes means smaller longitudes.","code":"data(\"Phyllomedusa\") rangesize <- lets.rangesize(Phyllomedusa, coordinates = \"geographic\") rangesize <- rangesize / 1000 # Transform in km2 centroids <- lets.midpoint(PAM) centroids d <- data.frame(centroids[, 2:3], \"Species\" = centroids[, 1], \"Range size\" = rangesize) sp <- terra::vect(x = d, geom = c(\"x\", \"y\")) plot(sp) plot(sf::st_geometry(wrld_simpl), add = TRUE) library(ggplot2) data_plot <- data.frame(centroids[, 2:3], \"Range size\" = rangesize) g <- ggplot(data_plot, aes(x, Range_size)) g + geom_smooth() + geom_point() + labs(x = \"Latitude(x)\", y = \"Range size\")"},{"path":"http://brunovilela.github.io/letsR/articles/species-level-macroecological-analysis.html","id":"example-2-extinction-risk-correlation-with-temperature","dir":"Articles","previous_headings":"","what":"Example 2: Extinction risk correlation with temperature","title":"Macroecological analysis at the species level","text":"evaluate temperature correlates extinction risk, first add temperature variable PresenceAbsence object. Next step get average temperature values per species. lets.summarizer can directly resulting object lets.addvar function (note can done onlyvar = FALSE). indicate position variable matrix using argument pos. Following example, need obtain IUCN extinction risk data. Previous version package included functions , longer supported. Luckily, new package called rredlist can us. Yet, now, can use example data letsR package called IUCN. Finally, can verify relationship temperature extinction risk. graph indicate tendency threatened Phyllomedusa species occur colder regions. Still, statistical analysis done confirm pattern. cite letsR publications use: Bruno Vilela Fabricio Villalobos (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution. DOI: 10.1111/2041-210X.12401","code":"data(temp) r <- terra::unwrap(temp) PAM_env <- lets.addvar(PAM, r, fun = mean) pos <- which(colnames(PAM_env) == \"bio1_mean\") temp_mean <- lets.summarizer(PAM_env, pos) temp_mean data(\"IUCN\") IUCN level_order <- c(\"DD\", \"LC\", \"EN\", \"CR\") # ordering for the plot data <- data.frame(\"Status\" = factor(IUCN$Status, levels = level_order), \"Temperature\" = temp_mean[, 2] / 10) g <- ggplot(data, aes(Status, Temperature)) g + geom_boxplot() + coord_flip()"},{"path":"http://brunovilela.github.io/letsR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Bruno Vilela. Author, maintainer. Fabricio Villalobos. Author.","code":""},{"path":"http://brunovilela.github.io/letsR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Bruno Vilela Fabricio Villalobos (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution. DOI: 10.1111/2041-210X.12401.","code":"@Article{, title = {letsR: a new R package for data handling and analysis in macroecology}, journal = {Methods in Ecology and Evolution}, author = {{Bruno Vilela} and {Fabricio Villalobos}}, year = {2015}, url = {https://besjournals.onlinelibrary.wiley.com/doi/full/10.1111/2041-210X.12401}, }"},{"path":[]},{"path":"http://brunovilela.github.io/letsR/index.html","id":"the-package","dir":"","previous_headings":"","what":"The package","title":"Data Handling and Analysis in Macroecology","text":"letsR package developed help researchers handle, process, analyze macroecological data. aims integrate methodological processes single software platform macroecological analyses. package’s main functions allow users build presence-absence matrices, primary analytical tool macroecology, species’ geographical distributions merge species’ traits, conservation information spatial environmental layers. addition, packages’ functions enable users summarize visualize data presence-absence matrices. functions package use prefix suffix separated dot; prefix refers package’s name, suffix actual function. nomenclature avoids confusion potentially similarly-named functions R packages. instance, letsR function used create presence-absence matrices called lets.presab (see also lets.presab.birds lets.presab.points), whereas one used add variables presence-absence matrix called lets.addvar. package’s primary functions create work particular S3 object class called PresenceAbsence. PresenceAbsence object class allows storing information beyond presence-absence data (e.g. user-defined grid-cell system) using generic plot, summary print functions R. Also, package’s functions allow user input customary R objects (e.g. vector, matrix, data.frame. letsR package continuous development, suggestions welcome! hope enjoy find helpful.","code":""},{"path":"http://brunovilela.github.io/letsR/index.html","id":"package-publication","dir":"","previous_headings":"","what":"Package publication","title":"Data Handling and Analysis in Macroecology","text":"https://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12401/abstract","code":""},{"path":"http://brunovilela.github.io/letsR/index.html","id":"install","dir":"","previous_headings":"","what":"Install","title":"Data Handling and Analysis in Macroecology","text":"Install letsR CRAN Install letsR developers version github OBS.: download developers version need git software installed (https://git-scm.com/). windows user also need download Rtools (https://cran.r-project.org/bin/windows/Rtools/).","code":"install.packages(\"letsR\") library(\"letsR\") install.packages(\"devtools\") library(devtools) install_github(\"macroecology/letsR\") library(letsR)"},{"path":"http://brunovilela.github.io/letsR/index.html","id":"note","dir":"","previous_headings":"","what":"Note","title":"Data Handling and Analysis in Macroecology","text":"Due changes IUCN API limitations data distribution established IUCN terms use, longer maintaining functions lets.iucn, lets.iucn.hist lets.iucn.ha. functions removed package next version. apologize inconvenience may cause.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/PAM.html","id":null,"dir":"Reference","previous_headings":"","what":"PresenceAbsence object for frogs of Phyllomedusa genus — PAM","title":"PresenceAbsence object for frogs of Phyllomedusa genus — PAM","text":"PresenceAbsence object obtained using function lets.presab Geographic distribution Southern American frog genus Phyllomedusa.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/PAM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"PresenceAbsence object for frogs of Phyllomedusa genus — PAM","text":"","code":"data(PAM)"},{"path":"http://brunovilela.github.io/letsR/reference/PAM.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"PresenceAbsence object for frogs of Phyllomedusa genus — PAM","text":"IUCN - https://www.iucnredlist.org/. 2014.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/Phyllomedusa.html","id":null,"dir":"Reference","previous_headings":"","what":"Geographic distribution of Phyllomedusa genus — Phyllomedusa","title":"Geographic distribution of Phyllomedusa genus — Phyllomedusa","text":"Geographic distribution Southern American frog genera Phyllomedusa. Data modfied IUCN (https://www.iucnredlist.org/, downloaded 05/2014). 32 species 46 polygons.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/Phyllomedusa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geographic distribution of Phyllomedusa genus — Phyllomedusa","text":"","code":"data(Phyllomedusa)"},{"path":"http://brunovilela.github.io/letsR/reference/Phyllomedusa.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Geographic distribution of Phyllomedusa genus — Phyllomedusa","text":"IUCN - https://www.iucnredlist.org/. 2014.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"PresenceAbsence Class — PresenceAbsence","title":"PresenceAbsence Class — PresenceAbsence","text":"PresenceAbsence new S3 object class created used inside letsR package. object class used store information species distribution within geographic domain form presence-absence matrix. addition, PresenceAbsence object also contains essential information (e.g. user-defined grid cell system, including resolution, projection, datum, extent) necessary analysis performed package's functions.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/PresenceAbsence.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"PresenceAbsence Class — PresenceAbsence","text":"Creating PresenceAbsence object PresenceAbsence object can generated using following functions: - lets.presab - lets.presab.birds - lets.presab.points PresenceAbsence information result list object class PresenceAbsence includes following objects: - Presence_and_Absence_Matrix: matrix species' presence(1) absence(0) information. first two columns contain longitude (x) latitude (y) cells' centroid (gridded domain used); - Richness_Raster: raster containing species richness information across geographic domain, can used map observed geographic gradient species richness; - Species_name: character vector species' names contained matrix. objects can obtained usign standard subsetting operators commonly applied list object (.e. '[[' '$'). letsR functions applied PresenceAbsence object following functions letsR package can directly applied PresenceAbsence: - lets.addpoly - lets.addvar - lets.distmat - lets.field - lets.gridirizer - lets.iucn - lets.iucn.ha - lets.iucn.- lets.maplizer - lets.midpoint - lets.overlap - lets.pamcrop - lets.rangesize Generic functions applied PresenceAbsence object following generic functions can directly applied PresenceAbsence object. - print (print.PresenceAbsence) - summary (summary.PresenceAbsence) - plot (plot.PresenceAbsence)","code":""},{"path":"http://brunovilela.github.io/letsR/reference/iucn.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN avaliation for frogs of Phyllomedusa genus — IUCN","title":"IUCN avaliation for frogs of Phyllomedusa genus — IUCN","text":"Result function lets.iucn applied Southern American frog genera Phyllomedusa 2014.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/iucn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN avaliation for frogs of Phyllomedusa genus — IUCN","text":"","code":"data(IUCN)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":null,"dir":"Reference","previous_headings":"","what":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"Crop PresenceAbsence object based shapefile provided user.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"","code":"lets.pamcrop(x, shp, remove.sp = TRUE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"x PresenceAbsence object. shp Object class SpatVector (see function terra::vect) crop PresenceAbsence object. remove.sp Logical, TRUE final matrix contain species match cell grid.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"result object class PresenceAbsence croped.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"","code":"if (FALSE) { data(PAM) data(\"wrld_simpl\") # PAM before crop plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") # Crop PAM to Brazil data(wrld_simpl) # World map Brazil <- wrld_simpl[wrld_simpl$NAME == \"Brazil\", ] # Brazil (polygon) PAM_crop <- lets.pamcrop(PAM, Brazil, remove.sp = TRUE) plot(PAM_crop, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness (Brazil crop)\") plot(sf::st_geometry(wrld_simpl), add = TRUE) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":null,"dir":"Reference","previous_headings":"","what":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"Add polygon coverage within cells PresenceAbsence object.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"","code":"lets.addpoly(x, y, z, onlyvar = FALSE, count = FALSE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"x PresenceAbsence object. y Polygon interest. z character indicating column name polygon containing attributes used. onlyvar TRUE matrix object returned. count Logical, TRUE progress bar indicating processing progress shown.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"result presence-absence matrix species polygons' attributes used added columns right-end matrix. Values represent percentage cell covered polygon attribute used.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"","code":"if (FALSE) { data(PAM) # Phyllomedusa presence-absence matrix data(wrld_simpl) # World map Brazil <- wrld_simpl[wrld_simpl$NAME == \"Brazil\", ] # Brazil (polygon) # Check where is the variable name # (in this case it is in \"NAME\" which will be my z value) names(Brazil) PAM_pol <- lets.addpoly(PAM, Brazil, \"NAME\", onlyvar = TRUE) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.addvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"Add variables (raster format), usually environmental, PresenceAbsence object. Variables included additional columns containing aggregate/summarize value variable(s) cell presence-absence matrix.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"","code":"lets.addvar(x, y, onlyvar = FALSE, fun = mean)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"x PresenceAbsence object. y Variables added SpatRaster format. onlyvar TRUE matrix object returned. fun Function used aggregate variables(s) values cell. Note work variables resolution value smaller (.e. higher resolution) PAM.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"result presence-absence matrix species variables added columns right-end matrix (see 'onlyvar' argument).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"PresenceAbsence Raster variable must projection.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"","code":"if (FALSE) { data(temp) # Global mean temperature temp <- terra::unwrap(temp) data(PAM) # Phyllomedusa presence-absence matrix # Mean temperature PAM_temp_mean <- lets.addvar(PAM, temp) # Standard deviation of temperature PAM_temp_sd <- lets.addvar(PAM, temp, fun = sd, onlyvar = TRUE) # Mean and SD in the PAM PAM_temp_mean_sd <- cbind(PAM_temp_mean, PAM_temp_sd) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.classvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Frequency distribution of a variable within a species' range — lets.classvar","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"Based species Presence-Absence matrix including variables interest (see lets.addvar), function divides continuous variable classes counts frequency class within species' range.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"","code":"lets.classvar(x, groups = \"default\", pos, xy)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"x Presence-absence matrix single variable added (see lets.addvar). groups number classes variable divided. Default calculates number classes default histogram (hist). pos Column number containing variable interest. xy Logical, TRUE input matrix contains geographic coordinates first two columns.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"matrix species rows variable's classes columns.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"Morales-Castilla et al. 2013. Range size patterns New World oscine passerines (Aves): insights differences among migratory sedentary clades. Journal Biogeography, 40, 2261-2273.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"","code":"if (FALSE) { data(PAM) data(temp) pamvar <- lets.addvar(PAM, temp) resu <- lets.classvar(x = pamvar, pos = ncol(pamvar), xy = TRUE) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.correl.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute correlogram based on the Moran's I index — lets.correl","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"Computes Moran's correlogram single multiple variables.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.correl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"","code":"lets.correl(x, y, z, equidistant = FALSE, plot = TRUE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.correl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"x single numeric variable vector format multiple variables matrix format (columns). y distance matrix class matrix dist. z number distance classes use correlogram. equidistant Logical, TRUE classes equidistant. FALSE classes equal number observations. plot Logical, TRUE correlogram ploted.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.correl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"Returns matrix Moran's Observed value, Confidence Interval (95 Expected value. Also p value randomization test, mean distance classes, number observations. quase tudo","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.correl.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"Sokal, R.R. & Oden, N.L. (1978) Spatial autocorrelation biology. 1. Methodology. Biological Journal Linnean Society, 10, 199-228. Sokal, R.R. & Oden, N.L. (1978) Spatial autocorrelation biology. 2. biological implications four applications evolutionary ecological interest. Biological Journal Linnean Society, 10, 229-249.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.correl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"Bruno Vilela, Fabricio Villalobos, Lucas Jardim & Jose Alexandre Diniz-Filho","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.correl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"","code":"if (FALSE) { data(PAM) data(IUCN) # Spatial autocorrelation in description year (species level) midpoint <- lets.midpoint(PAM) distan <- lets.distmat(midpoint[, 2:3]) moran <- lets.correl(IUCN$Description, distan, 12, equidistant = FALSE, plot = TRUE) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.distmat.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute a geographic distance matrix — lets.distmat","title":"Compute a geographic distance matrix — lets.distmat","text":"Calculates geographic distance matrix based PresenceAbsence two column matrix x(longitude) y(latitude).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute a geographic distance matrix — lets.distmat","text":"","code":"lets.distmat(xy, asdist = TRUE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute a geographic distance matrix — lets.distmat","text":"xy PresenceAbsence object matrix two columns (longitude, latitude). asdist Logical, TRUE result object class dist, FALSE result object class matrix.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute a geographic distance matrix — lets.distmat","text":"user can choose dist matrix class object returned. resulting values kilometres (see argument 'unit' rdist.earth).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute a geographic distance matrix — lets.distmat","text":"function basically facilitates use terra::distance PresenceAbsence object, allowing also user directly dist object. distance always expressed meter coordinate reference system longitude/latitude, map units otherwise. Map units typically meter, inspect crs(x) doubt.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute a geographic distance matrix — lets.distmat","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute a geographic distance matrix — lets.distmat","text":"","code":"if (FALSE) { data(PAM) distPAM <- lets.distmat(PAM) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.field.html","id":null,"dir":"Reference","previous_headings":"","what":"Create species' values based on the species co-occurrence within focal ranges — lets.field","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"Create single species' values based attributes species co-occurring within individual ranges.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.field.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"","code":"lets.field(x, y, z, weight = TRUE, xy = NULL, count = FALSE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.field.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"x PresenceAbsence object presence-absence matrix format (see xy argument matrix use) species named columns. y Species attribute considered. must numeric attribute. z Species names order attributes exactly named matrix PresenceAbsence object. weight TRUE value weighted species' range size, FALSE value mean species co-occur within focal species. xy TRUE presence-absence matrix contains cell coordinates first two columns. count Logical, TRUE counting window open.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.field.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"species co-occur species NaN returned.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.field.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"Villalobos, F. Arita, H.T. 2010. diversity field New World leaf-nosed bats (Phyllostomidae). Global Ecology Biogeography. 19, 200-211. Villalobos, F., Rangel, T.F., Diniz-Filho, J..F. 2013. Phylogenetic fields species: cross-species patterns phylogenetic structure geographical coexistence. Proceedings Royal Society B. 280, 20122570.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.field.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.field.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"","code":"if (FALSE) { data(PAM) range <- lets.rangesize(x = PAM, units = \"cell\") field <- lets.field(PAM, range, PAM$S, weight = TRUE) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Fits a grid into a PresenceAbsence object — lets.gridirizer","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"function creates grid shapefile format adds cells' IDs presence-absence matrix. function created facilitate use PresenceAbsence object ones prefer work grid shapefile format.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"","code":"lets.gridirizer(x)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"x PresenceAbsence object.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"result list two objects. first grid shapefile format; second presence-absence matrix aditional column called SP_ID (shapefile cell identifier).","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"","code":"if (FALSE) { data(PAM) PAM.grid <- lets.gridirizer(PAM) names(PAM.grid) # Grid in polygon format (can be saved in shapefile) PAM.grid$Grid # Presence-absence matrix (beggining only) head(PAM.grid$Presence[, 1:5]) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":null,"dir":"Reference","previous_headings":"","what":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"Get species' habitat information IUCN RedList website(https://www.iucnredlist.org/) one species.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"","code":"lets.iucn.ha(input, count = FALSE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"input Character vector one species names, object PresenceAbsence class. count Logical, TRUE counting window open.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"data frame species names first column habitats occurs remaining columns, '1' species present habitat '0' otherwise.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"Note must connected internet use function.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"","code":"if (FALSE) { # Single species lets.iucn.ha(\"Pongo pygmaeus\") # Multiple species sp <- c(\"Musonycteris harrisoni\", \"Ailuropoda melanoleuca\", \"Cebus flavius\") lets.iucn.ha(sp) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":null,"dir":"Reference","previous_headings":"","what":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"Get species conservation status time (.e. 1980 present date available) IUCN website(https://www.iucnredlist.org/) one species.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"","code":"lets.iucn.his(input, count = FALSE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"input character vector one species names, object class PresenceAbsence. count Logical, TRUE counting window open.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"data frame species names first column rows years (1980 - present) remaining columns, code represents species' conservation status (see IUCN RedList website details). species information (.e. evaluated), result : NE (evaluated). Codes categories: EX: Extinct EW: Extinct Wild VU: Vulnerable EN: Endangered CR: Critically Endangered LC: Least Concern NT: Near Threatened DD: Data Deficient CT: Commercially Threatened : Indeterminate IK: Insufficiently Known LR: Lower Risk RA: Rare","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"Note must connected internet use function.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"","code":"if (FALSE) { # Single species lets.iucn.his(\"Panthera onca\") # Multiple species sp <- c(\"Rhincodon typus\", \"Ailuropoda melanoleuca\") lets.iucn.his(sp) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.html","id":null,"dir":"Reference","previous_headings":"","what":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"Get species' information IUCN website(https://www.iucnredlist.org/) one species.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"","code":"lets.iucn(input, count = FALSE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"input Character vector one species names, object class PresenceAbsence. count Logical, TRUE counting window open.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"Returns data frame Species Name, Family, Conservation Status, Criteria used estabilish conservation status, Population Status, Year Description (animals), Countries occurs. species information (.e. evaluated), result : NE (evaluated).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"Note must connected internet use function.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"","code":"if (FALSE) { # Single species lets.iucn(\"Pongo pygmaeus\") # Multiple species sp <- c(\"Musonycteris harrisoni\", \"Ailuropoda melanoleuca\", \"Cebus flavius\") lets.iucn(sp) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"Transform IUCN RedList conservation status continuous values ranging 0 5.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"","code":"lets.iucncont(x, dd = NA, ne = NA)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"x vector matrix containing IUCN codes transformed. dd value attributed DD (data-deficient) species, default option NA. ne value attributed NE (-evaluated) species, default option NA.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"Returns vector/matrix continuos values 0 5. EX EW = 5 CR = 4 EN = 3 VU = 2 NT = 1 LC = 0 DD = NA NE = NA","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"Purvis et al., 2000. Predicting extinction risk declining species. Proceedings Royal Society London. Series B: Biological Sciences, 267.1456: 1947-1952.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"","code":"if (FALSE) { #Vector transformation status <- sample(c(\"EN\",\"VU\", \"NT\", \"CR\", \"DD\", \"LC\", \"EX\"), 30, replace = TRUE) transV <- lets.iucncont(status) #matrix transformation data(IUCN) transM <- lets.iucncont(IUCN) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.load.html","id":null,"dir":"Reference","previous_headings":"","what":"Load a PresenceAbsence object — lets.load","title":"Load a PresenceAbsence object — lets.load","text":"Reload PresenceAbsence objects written function lets.save.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.load.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load a PresenceAbsence object — lets.load","text":"","code":"lets.load(file)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.load.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load a PresenceAbsence object — lets.load","text":"file character string giving name file load.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.load.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load a PresenceAbsence object — lets.load","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.load.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load a PresenceAbsence object — lets.load","text":"","code":"if (FALSE) { data(PAM) lets.save(PAM, file = \"PAM.RData\") PAM <- lets.load(file = \"PAM.RData\") }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"Summarize species atributes per cell presence-absence matrix.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"","code":"lets.maplizer(x, y, z, func = mean, ras = FALSE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"x PresenceAbsence object. y Species attribute considered. must numeric attribute. z Species names order attributes exactly named PresenceAbsence object. func function summarize species' atribute cell (function must return one value). ras TRUE raster object returned together matrix.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"result can matrix list cointaining follow objects: Matrix: matrix object cells' geographic coordinates summarized species' attributes within . Raster: summarized species'attributed maped SpatRaster object.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"","code":"if (FALSE) { data(PAM) data(IUCN) trait <- IUCN$Description_Year resu <- lets.maplizer(PAM, trait, PAM$S, ras = TRUE) head(resu$Matrix) plot(resu$Raster, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Mean description year per site\") }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute the midpoint of species' geographic ranges — lets.midpoint","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"Calculate species distribution midpoint presence-absence matrix using several methods.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"","code":"lets.midpoint(pam, planar = FALSE, method = \"PC\", inside = FALSE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"pam presence-absence matrix (sites rows species columns, first two columns containing longitudinal latitudinal coordinates, respectively), object class PresenceAbsence. planar Logical, FALSE coordinates Longitude/Latitude. TRUE coordinates planar. method Default option, \"PC\" (polygon centroid) generate polygon raster, calculate centroid polygon based function terra::centroids. Note \"PC\" method, users can use PresenceAbsence objects. Note also method best PresenceAbsence objects made occurrence records, multiple disjoint distributions. Users can also choose geographic midpoint, using option \"GM\". \"GM\" create bounding box across extremes distribution calculate centroid. Alternatively, midpoint can calculated point minimize distance cells PAM, using method \"CMD\"(centre minimum distance). user can also calculate midpoint, based centroid minimum convex polygon distribution, using method \"MCC\". last method useful using PresenceAbsence object made occurrence records. inside logical. TRUE points returned guaranteed inside polygons lines, true centroids. True centroids may outside polygon, example polygon \"bean shaped\", unlikely line","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"data.frame containing species' names geographic coordinates (longitude [x], latitude [y]) species' midpoints.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"Fabricio Villalobos & Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"","code":"if (FALSE) { data(PAM) mid <- lets.midpoint(PAM, method = \"PC\") mid2 <- lets.midpoint(PAM, method = \"GM\") mid3 <- lets.midpoint(PAM, method = \"CMD\") mid4 <- lets.midpoint(PAM, method = \"MCC\") mid5 <- lets.midpoint(PAM, method = \"PC\", planar = TRUE) mid6 <- lets.midpoint(PAM, method = \"GM\", planar = TRUE) mid7 <- lets.midpoint(PAM, method = \"CMD\", planar = TRUE) mid8 <- lets.midpoint(PAM, method = \"MCC\", planar = TRUE) for (sp in seq_len(nrow(mid))) { #sp = 4 # Or choose a line or species plot(PAM, name = mid[sp, 1]) points(mid[sp, -1], col = adjustcolor(\"blue\", .8), pch = 20, cex = 1.5) points(mid2[sp, -1], col = adjustcolor(\"green\", .8), pch = 20, cex = 1.5) points(mid3[sp, -1], col = adjustcolor(\"yellow\", .8), pch = 20, cex = 1.5) points(mid4[sp, -1], col = adjustcolor(\"purple\", .8), pch = 20, cex = 1.5) points(mid5[sp, -1], col = adjustcolor(\"orange\", .8), pch = 20, cex = 1.5) points(mid6[sp, -1], col = adjustcolor(\"black\", .8), pch = 20, cex = 1.5) points(mid7[sp, -1], col = adjustcolor(\"gray\", .8), pch = 20, cex = 1.5) points(mid8[sp, -1], col = adjustcolor(\"brown\", .8), pch = 20, cex = 1.5) Sys.sleep(1) } }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.overlap.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute pairwise species' geographic overlaps — lets.overlap","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"Creates species geographic overlap matrix Presence-absence matrix.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"","code":"lets.overlap(pam, method = \"Chesser&Zink\", xy = NULL)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"pam presence-absence matrix (sites rows species columns, first two columns containing longitudinal latitudinal coordinates, respectively), object class PresenceAbsence. method method used calculate overlap matrix. \"Chesser&Zink\" calculates degree overlap proportion smaller range overlaps within larger range (Chesser & Zink 1994). \"Proportional\" calculates proportion range overlaps another range, resultant matrix symmetric. \"Cells\" show number overlapping grid cells pair species' ranges (species pair), resultant matrix symmetric. xy Logical, TRUE input matrix contains geographic coordinates first two columns.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"Chesser, R. Terry, Robert M. Zink. \"Modes speciation birds: test Lynch's method.\" Evolution (1994): 490-497. Barraclough, Timothy G., Alfried P. Vogler. \"Detecting geographical pattern speciation species-level phylogenies.\" American Naturalist 155.4 (2000): 419-434.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"Fabricio Villalobos & Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"","code":"if (FALSE) { data(PAM) CZ <- lets.overlap(PAM, method = \"Chesser&Zink\") prop <- lets.overlap(PAM, method = \"Proportional\") cells <- lets.overlap(PAM, method = \"Cells\") }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"Convert species' ranges (shapefile format stored particular folders) presence-absence matrix based user-defined grid. function specially designed work BirdLife Intl. shapefiles (https://www.birdlife.org). (Notice new versions birds spatial data similar format groups run using lets.presab function. keep function case someone needs use previous data format.)","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"","code":"lets.presab.birds( path, xmn = NULL, xmx = NULL, ymn = NULL, ymx = NULL, resol = NULL, remove.cells = TRUE, remove.sp = TRUE, show.matrix = FALSE, crs = \"+proj=longlat +datum=WGS84\", crs.grid = crs, cover = 0, presence = NULL, origin = NULL, seasonal = NULL, count = FALSE )"},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"path Path location folders one species' individual shapefiles. Shapefiles one species work function. use multi-species shapefiles see lets.presab. xmn Minimun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. xmx Maximun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymn Minimun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymx Maximun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. resol Numeric vector length 1 2 set grid resolution. NULL, resolution equivalent 1 degree latitude longitude. remove.cells Logical, TRUE final matrix contain cells grid value zero (.e. sites species present). remove.sp Logical, TRUE final matrix contain species match cell grid. show.matrix Logical, TRUE presence-absence matrix returned. crs Character representing PROJ.4 type description Coordinate Reference System (map projection) polygons. crs.grid Character representing PROJ.4 type description Coordinate Reference System (map projection) grid. Note change options may probably change extent coordinates resolution. cover Percentage cell covered shapefile considered presence (values 0 1). presence vector code numbers presence type considered process (IUCN spatial data https://www.iucnredlist.org/resources/spatial-data-download, see metadata). origin vector code numbers origin type considered process (IUCN spatial data). seasonal vector code numbers seasonal type considered process (IUCN spatial data). count Logical, TRUE progress bar indicating processing progress shown.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"result list object class PresenceAbsence following objects: Presence-Absence Matrix: matrix species' presence(1) absence(0) information. first two columns contain longitude (x) latitude (y) cells' centroid ( gridded domain used); Richness Raster: raster containing species richness data; Species name: character vector species' names contained matrix. *see optional argument show.matrix.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"function creates presence-absence matrix based raster file. Depending cell size, extension used number species may require lot memory, may take time process . Thus, process, count argument set TRUE, counting window open can see progress (.e. polygon function working). Note number polygons number species (.e. species may one polygon/shapefiles).","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"","code":"if (FALSE) { # Constructing a Presence/Absence matrix for birds # Attention: For your own files, omit the 'system.file' # and 'package=\"letsR\"', these are just to get the path # to files installed with the package. path.Ramphastos <- system.file(\"extdata\", package = \"letsR\") PAM <- lets.presab.birds(path.Ramphastos, xmn = -93, xmx = -29, ymn = -57, ymx = 25) # Species richness map plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Ramphastos species Richness\") }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"Convert species' ranges (shapefile format) presence-absence matrix based grid shapefile format.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"","code":"lets.presab.grid( shapes, grid, sample.unit, remove.sp = TRUE, presence = NULL, origin = NULL, seasonal = NULL )"},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"shapes Object class SpatVect Spatial (see packages terra sf read files) containing distribution one species. Species names stored object BINOMIAL/binomial SCINAME/sciname. grid Object class shapefile representing spatial grid (e.g. regular/irregular cells, political divisions, hexagonal grids, etc). grid shapefiles must projection. sample.unit Object class character name column (grid) representing sample units presence absence matrix. remove.sp Logical, TRUE final matrix contain species match cell grid. presence vector code numbers presence type considered process (IUCN spatial data https://www.iucnredlist.org/resources/spatial-data-download, see metadata). origin vector code numbers origin type considered process (IUCN spatial data). seasonal vector code numbers seasonal type considered process (IUCN spatial data).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"result list containing two objects: () matrix species presence (1) absence (0) values per sample unity. (II) original grid.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"function alternative way create presence absence matrix users already grid.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"","code":"if (FALSE) { # Species polygons data(\"Phyllomedusa\") data(\"wrld_simpl\") # Grid sp.r <- terra::as.polygons(terra::rast(resol = 5, crs = terra::crs(Phyllomedusa), xmin = -93, xmax = -29, ymin = -57, ymax = 15)) sp.r$ID <- 1:length(sp.r) # PAM resu <- lets.presab.grid(Phyllomedusa, sp.r, \"ID\") # Plot rich_plus1 <- rowSums(resu$PAM[, -1]) + 1 colfunc <- colorRampPalette(c(\"#fff5f0\", \"#fb6a4a\", \"#67000d\")) colors <- c(\"white\", colfunc(max(rich_plus1))) plot(resu$grid, border = \"gray40\", col = colors[rich_plus1]) plot(sf::st_geometry(wrld_simpl), add = TRUE) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"Convert species' ranges (shapefile format) presence-absence matrix based user-defined grid system","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"","code":"lets.presab( shapes, xmn = NULL, xmx = NULL, ymn = NULL, ymx = NULL, resol = NULL, remove.cells = TRUE, remove.sp = TRUE, show.matrix = FALSE, crs = \"+proj=longlat +datum=WGS84\", crs.grid = crs, cover = 0, presence = NULL, origin = NULL, seasonal = NULL, count = FALSE )"},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"shapes Object class SpatVect Spatial (see packages terra sf read files) containing distribution one species. Species names stored object BINOMIAL/binomial SCINAME/sciname. xmn Minimun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. xmx Maximun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymn Minimun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymx Maximun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. resol Numeric vector length 1 2 set grid resolution. NULL, resolution equivalent 1 degree latitude longitude. remove.cells Logical, TRUE final matrix contain cells grid value zero (.e. sites species present). remove.sp Logical, TRUE final matrix contain species match cell grid. show.matrix Logical, TRUE presence-absence matrix returned. crs Character representing PROJ.4 type description Coordinate Reference System (map projection) polygons. crs.grid Character representing PROJ.4 type description Coordinate Reference System (map projection) grid. Note change options may probably change extent coordinates resolution. cover Percentage cell covered shapefile considered presence (values 0 1). presence vector code numbers presence type considered process (IUCN spatial data https://www.iucnredlist.org/resources/spatial-data-download, see metadata). origin vector code numbers origin type considered process (IUCN spatial data). seasonal vector code numbers seasonal type considered process (IUCN spatial data). count Logical, TRUE progress bar indicating processing progress shown.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"result list object class PresenceAbsence following objects: Presence-Absence Matrix: matrix species' presence(1) absence(0) information. first two columns contain longitude (x) latitude (y) cells' centroid ( gridded domain used); Richness Raster: raster containing species richness data; Species name: character vector species' names contained matrix. *see optional argument show.matrix.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"function creates presence-absence matrix based raster object. Depending cell size, extension used number species may require lot memory, may take time process . Thus, process, count argument set TRUE, counting window open can see progress (.e. polygon/shapefile function working). Note number polygons number species (.e. species may one polygon/shapefiles).","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"","code":"if (FALSE) { # Spatial distribution polygons of south american frogs # of genus Phyllomedusa. data(Phyllomedusa) PAM <- lets.presab(Phyllomedusa) summary(PAM) # Species richness map plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") # Map of the specific species plot(PAM, name = \"Phyllomedusa nordestina\") }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"Convert species' occurrences presence-absence matrix based user-defined grid.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"","code":"lets.presab.points( xy, species, xmn = NULL, xmx = NULL, ymn = NULL, ymx = NULL, resol = NULL, remove.cells = TRUE, remove.sp = TRUE, show.matrix = FALSE, crs = \"+proj=longlat +datum=WGS84\", count = FALSE )"},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"xy matrix geographic coordinates species occurrences, first column longitude (x), second latitude (y). species Character vector species names, order coordinates. xmn Minimun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. xmx Maximun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymn Minimun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymx Maximun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. resol Numeric vector length 1 2 set grid resolution. NULL, resolution equivalent 1 degree latitude longitude. remove.cells Logical, TRUE final matrix contain cells grid value zero (.e. sites species present). remove.sp Logical, TRUE final matrix contain species match cell grid. show.matrix Logical, TRUE presence-absence matrix returned. crs Character representing PROJ.4 type description Coordinate Reference System (map projection) polygons. count Logical, TRUE progress bar indicating processing progress shown.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"result list object class PresenceAbsence following objects: Presence-Absence Matrix: matrix species' presence(1) absence(0) information. first two columns contain longitude (x) latitude (y) cells' centroid ( gridded domain used); Richness Raster: raster containing species richness data; Species name: character vector species' names contained matrix. *see optional argument show.matrix.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"function creates presence-absence matrix based raster file. Depending cell size, extension used number species may require lot memory, may take time process . Thus, process, count argument set TRUE, counting window open can see progress (.e. polygon function working). Note number polygons number species (.e. species may one polygon/shapefiles).","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"","code":"if (FALSE) { species <- c(rep(\"sp1\", 100), rep(\"sp2\", 100), rep(\"sp3\", 100), rep(\"sp4\", 100)) x <- runif(400, min = -69, max = -51) y <- runif(400, min = -23, max = -4) xy <- cbind(x, y) PAM <- lets.presab.points(xy, species, xmn = -93, xmx = -29, ymn = -57, ymx = 15) summary(PAM) # Species richness map plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Species richness map (simulated)\") # Map of the specific species plot(PAM, name = \"sp1\") }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute species' geographic range sizes — lets.rangesize","title":"Compute species' geographic range sizes — lets.rangesize","text":"function calculates species' range sizes PresenceAbsence object directly species' shapefiles.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute species' geographic range sizes — lets.rangesize","text":"","code":"lets.rangesize( x, species_name = NULL, coordinates = \"geographic\", units = \"cell\" )"},{"path":"http://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute species' geographic range sizes — lets.rangesize","text":"x PresenceAbsence SpatVector object. species_name Species names order SpatVector (needed x SpatVector). coordinates \"geographical\" \"planar\". Indicate whether shapefile geographical planar coordinates(needed x SpatVector). units \"cell\" \"squaremeter\". Indicate size units wanted number cells occupied square meters(needed x PresenceAbsence object).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute species' geographic range sizes — lets.rangesize","text":"result matrix range size species. range size accounts earth curvature (Yes ) size unit may differ argument combination: 1) SpatVector & geographical = Square meters. Yes. 2) SpatVector & planar = Square meters. . 3) PresenceAbsence & cell = number cells. . 4) PresenceAbsence & squaremeter = Square meters. Yes.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute species' geographic range sizes — lets.rangesize","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute species' geographic range sizes — lets.rangesize","text":"","code":"if (FALSE) { # SpatialPolygonsDataFrame & geographical data(Phyllomedusa) rangesize <- lets.rangesize(x = Phyllomedusa, coordinates = \"geographic\") # SpatialPolygonsDataFrame & planar rangesize2 <- lets.rangesize(x = Phyllomedusa, coordinates = \"planar\") # PresenceAbsence & cell data(PAM) rangesize3 <- lets.rangesize(x = PAM, units = \"cell\") # PresenceAbsence & squaremeter rangesize4 <- lets.rangesize(x = PAM, units = \"squaremeter\") }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.save.html","id":null,"dir":"Reference","previous_headings":"","what":"Save a PresenceAbsence object — lets.save","title":"Save a PresenceAbsence object — lets.save","text":"Save external representation PresenceAbsence object specified file. object can read back file later date using function lets.load.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.save.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save a PresenceAbsence object — lets.save","text":"","code":"lets.save(pam, ...)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.save.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save a PresenceAbsence object — lets.save","text":"pam PresenceAbsence object. ... arguments passed function save","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.save.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Save a PresenceAbsence object — lets.save","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.save.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Save a PresenceAbsence object — lets.save","text":"","code":"if (FALSE) { data(PAM) lets.save(PAM, file = \"PAM.RData\") PAM <- lets.load(file = \"PAM.RData\") }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"Filter species shapefiles origin, presence, seasonal type (following IUCN types: https://www.iucnredlist.org/resources/spatial-data-download, see metadata).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"","code":"lets.shFilter(shapes, presence = NULL, origin = NULL, seasonal = NULL)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"shapes Object class SpatVect Spatial (see packages terra sf read files) containing distribution one species. Species names stored object BINOMIAL/binomial SCINAME/sciname. presence vector code numbers presence type considered process (IUCN spatial data https://www.iucnredlist.org/resources/spatial-data-download, see metadata). origin vector code numbers origin type considered process (IUCN spatial data). seasonal vector code numbers seasonal type considered process (IUCN spatial data).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"result shapefile(s) filtered according selected types. filters remove polygons, result NULL.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"Presence codes: (1) Extant, (2) Probably Extant, (3) Possibly Extant, (4) Possibly Extinct, (5) Extinct (post 1500) & (6) Presence Uncertain. Origin codes: (1) Native, (2) Reintroduced, (3) Introduced, (4) Vagrant & (5) Origin Uncertain. Seasonal codes: (1) Resident, (2) Breeding Season, (3) Non-breeding Season, (4) Passage & (5) Seasonal Occurrence Uncertain. info shapefiles' metadata.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"Subset PresenceAbsence object based species character vector provided user.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"","code":"lets.subsetPAM(x, names, remove.cells = TRUE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"x PresenceAbsence object. names Character vector species names subset PresenceAbsence object. remove.cells Logical, TRUE final matrix contain cells grid value zero (.e. sites species present).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"result object class PresenceAbsence subseted.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"","code":"if (FALSE) { data(PAM) # PAM before subset plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") # Subset PAM to the first 20 species PAMsub <- lets.subsetPAM(PAM, PAM[[3]][1:20]) plot(PAMsub, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"Based Presence-Absence matrix added variables (see lets.addvar), function summarizes values variable(s) per species (across species' occupied cells. .e. within ranges).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"","code":"lets.summarizer(x, pos, xy = TRUE, fun = mean, ...)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"x Presence-absence matrix variables added. pos Column position variables interest. xy Logical, TRUE input matrix contains geographic coordinates first two columns. fun Function used summarize variable per species. Default mean. ... parameters passed function defined fun.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"Villalobos, F. Arita, H.T. 2010. diversity field New World leaf-nosed bats (Phyllostomidae). Global Ecology Biogeography. 19, 200-211.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"","code":"if (FALSE) { data(PAM) data(temp) temp <- terra::unwrap(temp) pamvar <- lets.addvar(PAM, temp) resu <- lets.summarizer(x = pamvar, pos = ncol(pamvar), xy = TRUE) }"},{"path":"http://brunovilela.github.io/letsR/reference/lets.transf.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform values of a vector — lets.transf","title":"Transform values of a vector — lets.transf","text":"Transform element vector.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.transf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform values of a vector — lets.transf","text":"","code":"lets.transf(x, y, z, NUMERIC = TRUE)"},{"path":"http://brunovilela.github.io/letsR/reference/lets.transf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform values of a vector — lets.transf","text":"x vector transformed. y levels transformed. z value atributed level (order y). NUMERIC logical, TRUE z considered numbers.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.transf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transform values of a vector — lets.transf","text":"Return vector changed values.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.transf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Transform values of a vector — lets.transf","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/lets.transf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform values of a vector — lets.transf","text":"","code":"if (FALSE) { status <- sample(c(\"EN\",\"VU\", \"NT\", \"CR\", \"DD\", \"LC\"), 30, replace=TRUE) TE <- \"Threatened\" NT <- \"Non-Threatened\" new <- c(TE, TE, NT, TE, \"Data Deficient\", NT) old <- c(\"EN\",\"VU\", \"NT\", \"CR\", \"DD\", \"LC\") statustrans <- lets.transf(status, old, new, NUMERIC=FALSE) }"},{"path":"http://brunovilela.github.io/letsR/reference/letsR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","title":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","text":"letsR package developed help researchers handling, processing, analysis macroecological data. purpose integrate methodological processes single software platform macroecological analyses. package's main functions allow users build presence-absence matrices, basic analytical tool macroecology, species' geographical distributions merge species' traits, conservation information (downloadable using functions package) spatial environmental layers. addition, package's functions enable users summarize visualize information presence-absence matrices.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/letsR-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","text":"functions package use prefix suffix separated dot. prefix refers package's name suffix actual function. done avoid confusion potentially similarly-named functions R packages. instance, letsR function used create presence-absence matrices called lets.presab (see also lets.presab.birds lets.presab.points) whereas one used add variables presence-absence matrix called lets.addvar. package's basic functions create work particular S3 object class called PresenceAbsence. PresenceAbsence object class allows storing information beyond presence-absence data (e.g. user-defined grid-cell system) using generic plot, summary print functions R. Also, package's functions allow user input customary R objects (e.g. vector, matrix, data.frame). Another set functions package allow user download species' information related description conservation status provided IUCN's REdList database (lets.iucn, lets.iucn.ha, lets.iucn.). , functions use IUCN's RedList API retrieve information webpage. looking recent version package, can get development version letsR github (https://github.com/macroecology/letsR).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/letsR-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","text":"Vilela, B., & Villalobos, F. (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/letsR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","text":"Bruno Vilela (email: bvilela@wustl.edu; Website: https://bvilela.weebly.com/) Fabricio Villalobos (email: fabricio.villalobos@gmail.com; Website: https://fabro.github.io)","code":""},{"path":"http://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"Plots species richness map object class PresenceAbsence particular species' map.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"","code":"# S3 method for PresenceAbsence plot(x, name = NULL, world = TRUE, col_rich = NULL, col_name = \"red\", ...)"},{"path":"http://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"x object class PresenceAbsence. name character specifying species ploted instead complete species richness map. world TURE map political divisions (countries) added plot. col_rich Color function (e.g. rainbow, heat.colors, colorRampPalette) used richness map. col_name color use ploting single species. ... parameters pass plot function.","code":""},{"path":[]},{"path":"http://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"","code":"if (FALSE) { data(PAM) plot(PAM) plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") plot(PAM, name = \"Phyllomedusa atelopoides\") plot(PAM, name = \"Phyllomedusa azurea\") }"},{"path":"http://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"Print for object of class PresenceAbsence — print.PresenceAbsence","title":"Print for object of class PresenceAbsence — print.PresenceAbsence","text":"Print objects class PresenceAbsence.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print for object of class PresenceAbsence — print.PresenceAbsence","text":"","code":"# S3 method for PresenceAbsence print(x, ...)"},{"path":"http://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print for object of class PresenceAbsence — print.PresenceAbsence","text":"x object class PresenceAbsence. ... print parameters.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print for object of class PresenceAbsence — print.PresenceAbsence","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","title":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","text":"Print summary objects class PresenceAbsence.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","text":"","code":"# S3 method for PresenceAbsence print.summary(x, ...)"},{"path":"http://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","text":"x object class PresenceAbsence. ... print parameters.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","title":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","text":"Summary objects class PresenceAbsence.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","text":"","code":"# S3 method for PresenceAbsence summary(object, ...)"},{"path":"http://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","text":"object object class PresenceAbsence. ... additional arguments affecting summary produced.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","text":"Bruno Vilela","code":""},{"path":"http://brunovilela.github.io/letsR/reference/temp.html","id":null,"dir":"Reference","previous_headings":"","what":"Avarege temperature raster for the world. — temp","title":"Avarege temperature raster for the world. — temp","text":"Average temperature raster Celsius degrees(multiplied 100) world 10 arc min resolution. Data modfied WorldClim (http://worldclim.com/, downloaded 05/2014).","code":""},{"path":"http://brunovilela.github.io/letsR/reference/temp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Avarege temperature raster for the world. — temp","text":"","code":"data(temp)"},{"path":"http://brunovilela.github.io/letsR/reference/temp.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Avarege temperature raster for the world. — temp","text":"Hijmans, R.J., S.E. Cameron, J.L. Parra, P.G. Jones . Jarvis, 2005. high resolution interpolated climate surfaces global land areas. International Journal Climatology 25: 1965-1978.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/wrld_simpl.html","id":null,"dir":"Reference","previous_headings":"","what":"Simplified world country polygons — wrld_simpl","title":"Simplified world country polygons — wrld_simpl","text":"Shapefile sf format. object obtained maptools package converted sf.","code":""},{"path":"http://brunovilela.github.io/letsR/reference/wrld_simpl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simplified world country polygons — wrld_simpl","text":"","code":"data(temp)"},{"path":"http://brunovilela.github.io/letsR/reference/wrld_simpl.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Simplified world country polygons — wrld_simpl","text":"Originally “http://mappinghacks.com/data/TM_WORLD_BORDERS_SIMPL-0.2.zip”, now available https://github.com/nasa/World-Wind-Java/tree/master/WorldWind/testData/shapefiles","code":""}] +[{"path":"https://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"iucn-shapefiles","dir":"Articles","previous_headings":"","what":"IUCN shapefiles","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"begin, download species distribution shapefiles IUCN website. can import data using terra::vect sf::st_read functions. purpose tutorial, utilizing distribution data frogs belonging Phyllomedusa genus, conveniently pre-loaded within letsR package. can plot data see looks like.","code":"library(letsR) data(\"Phyllomedusa\") # Plot ## Color settings and assignment colors <- rainbow(length(unique(Phyllomedusa$binomial)), alpha = 0.5) position <- match(Phyllomedusa$binomial, unique(Phyllomedusa$binomial)) colors <- colors[position] ## Plot call plot(sf::st_geometry(Phyllomedusa), col = colors, lty = 0, main = \"Spatial polygons of Phyllomedusa\") data(\"wrld_simpl\") plot(sf::st_geometry(wrld_simpl), add = TRUE)"},{"path":"https://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"quick-start","dir":"Articles","previous_headings":"IUCN shapefiles","what":"Quick start","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"Next step, can use function lets.presab convert species’ ranges (shapefile format) presence-absence matrix based user-defined grid system. simple way define extent resolution grid. Please aware working shapefiles containing numerous species opting high-resolution grid, function’s execution may become notably slow. instances, advisable monitor relative running time analysis enabling count = TRUE argument. lets.presab function yields PresenceAbsence object (unless show.matrix = TRUE, case presence-absence matrix returned). object essentially list comprising presence-absence matrix, raster containing geographical information, species names. additional details, refer ?PresenceAbsence. obtain summary information generated Presence-Absence Matrix (PAM), summary function can employed. can also use plot function directly PAM object. plot function also allow users plot specific species distributions. example, can plot map Phyllomedusa hypochondrialis: said , PAM object contains actual presence absence matrix, access can use following code: first two columns matrix contain longitude (x) latitude (y) cells’ centroid, following columns include species’ presence(1) absence(0) information.","code":"PAM <- lets.presab(Phyllomedusa, xmn = -93, xmx = -29, ymn = -57, ymx = 15, res = 1) summary(PAM) ## ## Class: PresenceAbsence ## _ _ ## Number of species: 32 ## Number of cells: 1187 ## Cells with presence: 1187 ## Cells without presence: 0 ## Species without presence: 0 ## Species with the largest range: Phyllomedusa hypochondrialis ## _ _ ## Grid parameters ## Resolution: 1, 1 (x, y) ## Extention: -93, -29, -57, 15 (xmin, xmax, ymin, ymax) ## Coord. Ref.: +proj=longlat +datum=WGS84 +no_defs plot(PAM) plot(PAM, name = \"Phyllomedusa hypochondrialis\") presab <- PAM$Presence_and_Absence_Matrix # Print only the first 5 rows and 3 columns presab[1:5, 1:3] ## Longitude(x) Latitude(y) Phyllomedusa araguari ## [1,] -74.5 11.5 0 ## [2,] -69.5 11.5 0 ## [3,] -68.5 11.5 0 ## [4,] -75.5 10.5 0 ## [5,] -74.5 10.5 0"},{"path":"https://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"using-different-projections","dir":"Articles","previous_headings":"IUCN shapefiles","what":"Using different projections","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"users may want use different projections generate presence absence matrix. lets.presab function allow users changing crs.grid argument. Check example using South America Equidistant Conic projection.","code":"pro <- paste(\"+proj=eqdc +lat_0=-32 +lon_0=-60 +lat_1=-5\", \"+lat_2=-42 +x_0=0 +y_0=0 +ellps=aust_SA\", \"+units=m +no_defs\") SA_EC <- terra::crs(pro) PAM_proj <- lets.presab(Phyllomedusa, xmn = -4135157, xmx = 4707602, ymn = -450000, ymx = 5774733, res = 100000, crs.grid = SA_EC) summary(PAM_proj) ## ## Class: PresenceAbsence ## _ _ ## Number of species: 32 ## Number of cells: 1396 ## Cells with presence: 1396 ## Cells without presence: 0 ## Species without presence: 0 ## Species with the largest range: Phyllomedusa hypochondrialis ## _ _ ## Grid parameters ## Resolution: 1e+05, 1e+05 (x, y) ## Extention: -4135157, 4664843, -450000, 5750000 (xmin, xmax, ymin, ymax) ## Coord. Ref.: +proj=eqdc +lat_0=-32 +lon_0=-60 +lat_1=-5 +lat_2=-42 +x_0=0 +y_0=0 +ellps=aust_SA +units=m +no_defs plot(PAM_proj) # Add projected country boundaries data(\"wrld_simpl\") plot(sf::st_transform(sf::st_geometry(wrld_simpl), pro), add = TRUE)"},{"path":"https://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"other-features","dir":"Articles","previous_headings":"IUCN shapefiles","what":"Other features","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"function lets.presab useful arguments. instance, users may wish exclude regions species extinct retain breeding ranges. presence, origin, seasonal arguments enable users filter species distributions based IUCN classification different parts species’ range. find specific values arguments, consult IUCN metadata files. certain scenarios, proves advantageous consider species present cell covers specified percentage value. Users can customize threshold using cover argument. ’s important note initially, option exclusively available coordinates degrees (longitude/latitude). However, latest update GitHub, users can now employ cover argument projections well. Observing plot , ’s evident cells near continent’s border longer reflect presence species. generating multiple PresenceAbsence objects distinct groups, users might prefer maintain consistent grid. achieve , ’s crucial retain remove.cells = FALSE argument, preventing modification grid. Conversely, setting remove.cells = TRUE excludes cells value zero final matrix, meaning sites species present won’t included. can now employ summary function confirm whether empty cells retained. Additionally, users intending retain species occur cell grid, essential configure remove.sp = FALSE.","code":"# 90% cover PAM_90 <- lets.presab(Phyllomedusa, xmn = -93, xmx = -29, ymn = -57, ymx = 15, res = 1, cover = 0.9) plot(PAM_90) PAM_keep_cells <- lets.presab(Phyllomedusa, xmn = -93, xmx = -29, ymn = -57, ymx = 15, res = 1, remove.cells = FALSE) summary(PAM_keep_cells) ## ## Class: PresenceAbsence ## _ _ ## Number of species: 32 ## Number of cells: 4608 ## Cells with presence: 1187 ## Cells without presence: 3421 ## Species without presence: 0 ## Species with the largest range: Phyllomedusa hypochondrialis ## _ _ ## Grid parameters ## Resolution: 1, 1 (x, y) ## Extention: -93, -29, -57, 15 (xmin, xmax, ymin, ymax) ## Coord. Ref.: +proj=longlat +datum=WGS84 +no_defs"},{"path":"https://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"occurrence-data-e-g--gbif","dir":"Articles","previous_headings":"","what":"Occurrence data (e.g. GBIF)","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"Another prevalent source spatial data occurrence records. lets.presab.points function enables users input records, generating PresenceAbsence object. utilize function, ’ll need two-column matrix containing longitude latitude, along vector indicating species name occurrence record. example , going simulate random occurrence points. Now coordinates species name, can use lets.presab.points function.","code":"species <- c(rep(\"sp1\", 100), rep(\"sp2\", 100), rep(\"sp3\", 100), rep(\"sp4\", 100)) x <- runif(400, min = -69, max = -51) y <- runif(400, min = -23, max = -4) xy <- cbind(x, y) PAM_points <- lets.presab.points(xy, species, xmn = -93, xmx = -29, ymn = -57, ymx = 15) plot(PAM_points)"},{"path":"https://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html","id":"using-your-own-grid","dir":"Articles","previous_headings":"","what":"Using your own grid","title":"A guide to transform species distributions into a presence absence matrix based on a user-defined grid in R","text":"different reasons users may want create presence absence matrix based grid shapefile format. function lets.presab.grid allow users convert species’ ranges presence-absence matrix based grid shapefile format. However, function returns actual matrix presence absence grid, PresenceAbsence object. situations possible convert result PresenceAbsence object, cover new post soon. Let’s first create grid: Now can build presence absence matrix grid. result list presence absence matrix grid. plot richness map can use following code: covers functions convert species distribution presence absence matrix using letsR package. Let know suggestion comments, please share like . cite letsR publications use: Bruno Vilela Fabricio Villalobos (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution. DOI: 10.1111/2041-210X.12401","code":"# Grid sp.r <- terra::as.polygons(terra::rast(xmin = -93, xmax = -29, ymin = -57, ymax = 15, resolution = 5)) # Give an ID to the cell sp.r$ID <- 1:length(sp.r) plot(sp.r, border = rgb(.5, .5, .5)) plot(sf::st_geometry(wrld_simpl[1]), add = T, fill = F) resu <- lets.presab.grid(Phyllomedusa, sp.r, \"ID\") rich_plus1 <- rowSums(resu$PAM[, -1]) + 1 colfunc <- colorRampPalette(c(\"#fff5f0\", \"#fb6a4a\", \"#67000d\")) colors <- c(\"white\", colfunc(max(rich_plus1))) plot(resu$grid, border = \"gray40\", col = colors[rich_plus1]) plot(sf::st_geometry(wrld_simpl), add = TRUE)"},{"path":"https://brunovilela.github.io/letsR/articles/Adding-variables-to-a-presenceabsence-object.html","id":"adding-variables-in-raster-format","dir":"Articles","previous_headings":"","what":"Adding variables in raster format","title":"Adding variables to a PresenceAbsence object","text":"add variables raster format PresenceAbsence object can use function lets.addvar letsR package. function takes raster object resolution extent, transform match information PresenceAbsence object. Subsequently, variables included additional columns containing aggregate/summarize value variable(s) cell presence-absence matrix. Let’s see example using bioclimatic data WorldClim. use Average temperature raster Celsius degrees (multiplied 100) world 10 arc min resolution. use PresenceAbsence object Phyllomedusa species previously generated. can now run lets.addvar function. Just make sure two objects projection using function. Also, note climatic data higher resolution PAM. case, choose function aggregate values argument fun. situations, people interested averaging values aggregate multiple cells, specific cases may want sum , get standard deviation, use another function. result presence absence matrix, last columns now include raster values. Check table: want coordinates species included can set argument onlyvar = TRUE. Now variables, can use relate species data many ways. example, graph relationship temperature species richness.","code":"library(letsR) data(temp) r <- terra::unwrap(temp) # example data plot(r) data(PAM) plot(PAM, main = \"Phyllomedusa\\nRichness\") PAM_env <- lets.addvar(PAM, r, fun = mean) head(PAM_env) climate <- lets.addvar(PAM, r, fun = mean, onlyvar = TRUE) head(climate) library(ggplot2) rich <- rowSums(PAM$P[, -(1:2)]) mpg1 <- data.frame(\"Temperature\" = climate[, 1]/10, \"Richness\" = rich) ggplot(mpg1, aes(Temperature, Richness)) + geom_smooth() + geom_point(col = rgb(0, 0, 0, .6)) + theme_bw()"},{"path":"https://brunovilela.github.io/letsR/articles/Adding-variables-to-a-presenceabsence-object.html","id":"adding-variables-in-polygon-format","dir":"Articles","previous_headings":"","what":"Adding variables in polygon format","title":"Adding variables to a PresenceAbsence object","text":"Data shapefile format like ecorregions, conservation units countries, can added PAM using function lets.addpoly. function adds polygons’ attributes columns right-end matrix. values represent percentage cell covered polygon attribute used. example, can use South America countries map available package maptools. Now can add variables PAM. information can used calculate number species per country example. cite letsR publications use: Bruno Vilela Fabricio Villalobos (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution. DOI: 10.1111/2041-210X.12401","code":"data(\"wrld_simpl\") SA <- c(\"Brazil\", \"Colombia\", \"Argentina\", \"Peru\", \"Venezuela\", \"Chile\", \"Ecuador\", \"Bolivia\", \"Paraguay\", \"Uruguay\", \"Guyana\", \"Suriname\", \"French Guiana\") south_ame <- wrld_simpl[wrld_simpl$NAME %in% SA, ] ggplot(data = south_ame) + geom_sf() + geom_sf_text(aes(label = ISO3)) + theme_bw() PAM_pol <- lets.addpoly(PAM, south_ame, \"NAME\") head(PAM_pol) vars_col <- (ncol(PAM$P) + 1):ncol(PAM_pol) n <- length(vars_col) rich_count <- numeric(n) for (i in 1:n) { rich_count[i] <- sum(colSums(PAM$P[PAM_pol[, vars_col[i]] > 0, -(1:2)]) > 0) } labs <- as.factor(colnames(PAM_pol)[vars_col]) names(rich_count) <- labs mpg <- data.frame(\"Richness\" = rich_count, \"Country\" = as.factor(labs)) g <- ggplot(mpg, aes(labs, Richness)) g + geom_bar(stat = \"identity\") + labs(x = \"\") + theme(axis.text.x = element_text(angle = 90, hjust = 1))"},{"path":"https://brunovilela.github.io/letsR/articles/mapping-species-traits.html","id":"community-level-analysis","dir":"Articles","previous_headings":"","what":"Community level analysis","title":"Mapping species traits: community level analysis","text":"map trait cell, can use lets.maplizer function. can choose function aggregate species trait per cell, case want use default option average values. also want function return raster mapped traits, set ras = TRUE. Visually, Rapoport’s rule doesn’t seem work Phyllomedusa frogs. can go see relationship latitude. Seems Rapoport’s rule doesn’t stand genus, actually direction seems inverted, least analyzing community level. However, confirm perform formal statistical analysis control spatial autocorrelation problems. quick note . Scientists careful type community analysis, repetition species co-occurrence can easily generate spurious patterns significant correlations (see paper discussion). cite letsR publications use: Bruno Vilela Fabricio Villalobos (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution. DOI: 10.1111/2041-210X.12401","code":"resu <- lets.maplizer(PAM, rangesize, rownames(rangesize), ras = TRUE) cols2 <- colorRampPalette(c('#e0ecf4','#9ebcda','#8856a7')) plot(resu$Raster, col = cols2(10), main = \"Mean Range Size\") data(\"wrld_simpl\") plot(sf::st_geometry(wrld_simpl), add = TRUE) library(ggplot2) mpg <- as.data.frame(resu$Matrix) f <- ggplot(mpg, aes(`Latitude(y)`, Variable_mean)) f + geom_smooth(model = lm) + geom_point(col = rgb(0, 0, 0, .6)) + labs(y = \"Range Size\") + theme_bw()"},{"path":"https://brunovilela.github.io/letsR/articles/species-level-macroecological-analysis.html","id":"example-1-species-level-test-of-rapoports-rule-on-phyllomedusa-frogs-","dir":"Articles","previous_headings":"","what":"Example 1: Species level test of Rapoport’s rule on Phyllomedusa frogs.","title":"Macroecological analysis at the species level","text":"first calculate species range size. can directly species shapefiles higher precision. second step calculate species geographical centroid/midpoint using function lets.midpoint. several ways calculate species geographic centroid, function offers several methods . species range circular continuous, methods provide answer. However, shape distributions start become complex, different methods provide different answers. example, use default option “PC” (polygon centroid). method generate polygon raster, calculate centroid polygon. can also plot geographical centroids. check Rapoport’s rule can plot latitude range size: , data indicate Rapoport’s rule apply Phyllomedusa genus. However, seems interesting pattern range size decreases center towards extremes group. effect niche conservatism, species extreme latitude face different conditions ancestral Phylllomedusa. Another possibility pattern due shape continent, extreme latitudes means smaller longitudes.","code":"data(\"Phyllomedusa\") rangesize <- lets.rangesize(Phyllomedusa, coordinates = \"geographic\") rangesize <- rangesize / 1000 # Transform in km2 centroids <- lets.midpoint(PAM) centroids d <- data.frame(centroids[, 2:3], \"Species\" = centroids[, 1], \"Range size\" = rangesize) sp <- terra::vect(x = d, geom = c(\"x\", \"y\")) plot(sp) plot(sf::st_geometry(wrld_simpl), add = TRUE) library(ggplot2) data_plot <- data.frame(centroids[, 2:3], \"Range size\" = rangesize) g <- ggplot(data_plot, aes(x, Range_size)) g + geom_smooth() + geom_point() + labs(x = \"Latitude(x)\", y = \"Range size\")"},{"path":"https://brunovilela.github.io/letsR/articles/species-level-macroecological-analysis.html","id":"example-2-extinction-risk-correlation-with-temperature","dir":"Articles","previous_headings":"","what":"Example 2: Extinction risk correlation with temperature","title":"Macroecological analysis at the species level","text":"evaluate temperature correlates extinction risk, first add temperature variable PresenceAbsence object. Next step get average temperature values per species. lets.summarizer can directly resulting object lets.addvar function (note can done onlyvar = FALSE). indicate position variable matrix using argument pos. Following example, need obtain IUCN extinction risk data. Previous version package included functions , longer supported. Luckily, new package called rredlist can us. Yet, now, can use example data letsR package called IUCN. Finally, can verify relationship temperature extinction risk. graph indicate tendency threatened Phyllomedusa species occur colder regions. Still, statistical analysis done confirm pattern. cite letsR publications use: Bruno Vilela Fabricio Villalobos (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution. DOI: 10.1111/2041-210X.12401","code":"data(temp) r <- terra::unwrap(temp) PAM_env <- lets.addvar(PAM, r, fun = mean) pos <- which(colnames(PAM_env) == \"bio1_mean\") temp_mean <- lets.summarizer(PAM_env, pos) temp_mean data(\"IUCN\") IUCN level_order <- c(\"DD\", \"LC\", \"EN\", \"CR\") # ordering for the plot data <- data.frame(\"Status\" = factor(IUCN$Status, levels = level_order), \"Temperature\" = temp_mean[, 2] / 10) g <- ggplot(data, aes(Status, Temperature)) g + geom_boxplot() + coord_flip()"},{"path":"https://brunovilela.github.io/letsR/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Bruno Vilela. Author, maintainer. Fabricio Villalobos. Author.","code":""},{"path":"https://brunovilela.github.io/letsR/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Vilela B, Villalobos F (2015). “letsR: new R package data handling analysis macroecology.” Methods Ecology Evolution, 6(10), -5. doi:10.1111/2041-210X.12401, https://besjournals.onlinelibrary.wiley.com/doi/abs/10.1111/2041-210X.12401.","code":"@Article{, title = {letsR: a new R package for data handling and analysis in macroecology}, author = {Bruno Vilela and Fabricio Villalobos}, journal = {Methods in Ecology and Evolution}, year = {2015}, volume = {6}, number = {10}, pages = {-5}, url = {https://besjournals.onlinelibrary.wiley.com/doi/abs/10.1111/2041-210X.12401}, doi = {10.1111/2041-210X.12401}, }"},{"path":[]},{"path":"https://brunovilela.github.io/letsR/index.html","id":"the-package","dir":"","previous_headings":"","what":"The package","title":"Data Handling and Analysis in Macroecology","text":"letsR package developed help researchers handle, process, analyze macroecological data. aims integrate methodological processes single software platform macroecological analyses. package’s main functions allow users build presence-absence matrices, primary analytical tool macroecology, species’ geographical distributions merge species’ traits, conservation information spatial environmental layers. addition, packages’ functions enable users summarize visualize data presence-absence matrices. functions package use prefix suffix separated dot; prefix refers package’s name, suffix actual function. nomenclature avoids confusion potentially similarly-named functions R packages. instance, letsR function used create presence-absence matrices called lets.presab (see also lets.presab.birds lets.presab.points), whereas one used add variables presence-absence matrix called lets.addvar. package’s primary functions create work particular S3 object class called PresenceAbsence. PresenceAbsence object class allows storing information beyond presence-absence data (e.g. user-defined grid-cell system) using generic plot, summary print functions R. Also, package’s functions allow user input customary R objects (e.g. vector, matrix, data.frame. letsR package continuous development, suggestions welcome! hope enjoy find helpful.","code":""},{"path":"https://brunovilela.github.io/letsR/index.html","id":"package-publication","dir":"","previous_headings":"","what":"Package publication","title":"Data Handling and Analysis in Macroecology","text":"https://besjournals.onlinelibrary.wiley.com/doi/abs/10.1111/2041-210X.12401","code":""},{"path":"https://brunovilela.github.io/letsR/index.html","id":"install","dir":"","previous_headings":"","what":"Install","title":"Data Handling and Analysis in Macroecology","text":"Install letsR CRAN Install letsR developers version github OBS.: download developers version need git software installed (https://git-scm.com/). windows user also need download Rtools (https://cran.r-project.org/bin/windows/Rtools/).","code":"install.packages(\"letsR\") library(\"letsR\") install.packages(\"devtools\") library(devtools) install_github(\"macroecology/letsR\") library(letsR)"},{"path":"https://brunovilela.github.io/letsR/index.html","id":"note","dir":"","previous_headings":"","what":"Note","title":"Data Handling and Analysis in Macroecology","text":"Due changes IUCN API limitations data distribution established IUCN terms use, longer maintaining functions lets.iucn, lets.iucn.hist lets.iucn.ha. functions removed package next version. apologize inconvenience may cause.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/PAM.html","id":null,"dir":"Reference","previous_headings":"","what":"PresenceAbsence object for frogs of Phyllomedusa genus — PAM","title":"PresenceAbsence object for frogs of Phyllomedusa genus — PAM","text":"PresenceAbsence object obtained using function lets.presab Geographic distribution Southern American frog genus Phyllomedusa.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/PAM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"PresenceAbsence object for frogs of Phyllomedusa genus — PAM","text":"","code":"data(PAM)"},{"path":"https://brunovilela.github.io/letsR/reference/PAM.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"PresenceAbsence object for frogs of Phyllomedusa genus — PAM","text":"IUCN - https://www.iucnredlist.org/. 2014.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/Phyllomedusa.html","id":null,"dir":"Reference","previous_headings":"","what":"Geographic distribution of Phyllomedusa genus — Phyllomedusa","title":"Geographic distribution of Phyllomedusa genus — Phyllomedusa","text":"Geographic distribution Southern American frog genera Phyllomedusa. Data modfied IUCN (https://www.iucnredlist.org/, downloaded 05/2014). 32 species 46 polygons.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/Phyllomedusa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Geographic distribution of Phyllomedusa genus — Phyllomedusa","text":"","code":"data(Phyllomedusa)"},{"path":"https://brunovilela.github.io/letsR/reference/Phyllomedusa.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Geographic distribution of Phyllomedusa genus — Phyllomedusa","text":"IUCN - https://www.iucnredlist.org/. 2014.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"PresenceAbsence Class — PresenceAbsence","title":"PresenceAbsence Class — PresenceAbsence","text":"PresenceAbsence new S3 object class created used inside letsR package. object class used store information species distribution within geographic domain form presence-absence matrix. addition, PresenceAbsence object also contains essential information (e.g. user-defined grid cell system, including resolution, projection, datum, extent) necessary analysis performed package's functions.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/PresenceAbsence.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"PresenceAbsence Class — PresenceAbsence","text":"Creating PresenceAbsence object PresenceAbsence object can generated using following functions: - lets.presab - lets.presab.birds - lets.presab.points PresenceAbsence information result list object class PresenceAbsence includes following objects: - Presence_and_Absence_Matrix: matrix species' presence(1) absence(0) information. first two columns contain longitude (x) latitude (y) cells' centroid (gridded domain used); - Richness_Raster: raster containing species richness information across geographic domain, can used map observed geographic gradient species richness; - Species_name: character vector species' names contained matrix. objects can obtained usign standard subsetting operators commonly applied list object (.e. '[[' '$'). letsR functions applied PresenceAbsence object following functions letsR package can directly applied PresenceAbsence: - lets.addpoly - lets.addvar - lets.distmat - lets.field - lets.gridirizer - lets.iucn - lets.iucn.ha - lets.iucn.- lets.maplizer - lets.midpoint - lets.overlap - lets.pamcrop - lets.rangesize Generic functions applied PresenceAbsence object following generic functions can directly applied PresenceAbsence object. - print (print.PresenceAbsence) - summary (summary.PresenceAbsence) - plot (plot.PresenceAbsence)","code":""},{"path":"https://brunovilela.github.io/letsR/reference/iucn.html","id":null,"dir":"Reference","previous_headings":"","what":"IUCN avaliation for frogs of Phyllomedusa genus — IUCN","title":"IUCN avaliation for frogs of Phyllomedusa genus — IUCN","text":"Result function lets.iucn applied Southern American frog genera Phyllomedusa 2014.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/iucn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"IUCN avaliation for frogs of Phyllomedusa genus — IUCN","text":"","code":"data(IUCN)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":null,"dir":"Reference","previous_headings":"","what":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"Crop PresenceAbsence object based shapefile provided user.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"","code":"lets.pamcrop(x, shp, remove.sp = TRUE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"x PresenceAbsence object. shp Object class SpatVector (see function terra::vect) crop PresenceAbsence object. remove.sp Logical, TRUE final matrix contain species match cell grid.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"result object class PresenceAbsence croped.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.PAMcrop.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Crop a PresenceAbsence object based on an input shapefile — lets.pamcrop","text":"","code":"if (FALSE) { data(PAM) data(\"wrld_simpl\") # PAM before crop plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") # Crop PAM to Brazil data(wrld_simpl) # World map Brazil <- wrld_simpl[wrld_simpl$NAME == \"Brazil\", ] # Brazil (polygon) PAM_crop <- lets.pamcrop(PAM, Brazil, remove.sp = TRUE) plot(PAM_crop, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness (Brazil crop)\") plot(sf::st_geometry(wrld_simpl), add = TRUE) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":null,"dir":"Reference","previous_headings":"","what":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"Add polygon coverage within cells PresenceAbsence object.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"","code":"lets.addpoly(x, y, z, onlyvar = FALSE, count = FALSE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"x PresenceAbsence object. y Polygon interest. z character indicating column name polygon containing attributes used. onlyvar TRUE matrix object returned. count Logical, TRUE progress bar indicating processing progress shown.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"result presence-absence matrix species polygons' attributes used added columns right-end matrix. Values represent percentage cell covered polygon attribute used.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.addpoly.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add polygon coverage to a PresenceAbscence object — lets.addpoly","text":"","code":"if (FALSE) { data(PAM) # Phyllomedusa presence-absence matrix data(wrld_simpl) # World map Brazil <- wrld_simpl[wrld_simpl$NAME == \"Brazil\", ] # Brazil (polygon) # Check where is the variable name # (in this case it is in \"NAME\" which will be my z value) names(Brazil) PAM_pol <- lets.addpoly(PAM, Brazil, \"NAME\", onlyvar = TRUE) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.addvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"Add variables (raster format), usually environmental, PresenceAbsence object. Variables included additional columns containing aggregate/summarize value variable(s) cell presence-absence matrix.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"","code":"lets.addvar(x, y, onlyvar = FALSE, fun = mean)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"x PresenceAbsence object. y Variables added SpatRaster format. onlyvar TRUE matrix object returned. fun Function used aggregate variables(s) values cell. Note work variables resolution value smaller (.e. higher resolution) PAM.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"result presence-absence matrix species variables added columns right-end matrix (see 'onlyvar' argument).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"PresenceAbsence Raster variable must projection.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.addvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Add variables (in raster format) to a PresenceAbscence object — lets.addvar","text":"","code":"if (FALSE) { data(temp) # Global mean temperature temp <- terra::unwrap(temp) data(PAM) # Phyllomedusa presence-absence matrix # Mean temperature PAM_temp_mean <- lets.addvar(PAM, temp) # Standard deviation of temperature PAM_temp_sd <- lets.addvar(PAM, temp, fun = sd, onlyvar = TRUE) # Mean and SD in the PAM PAM_temp_mean_sd <- cbind(PAM_temp_mean, PAM_temp_sd) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.classvar.html","id":null,"dir":"Reference","previous_headings":"","what":"Frequency distribution of a variable within a species' range — lets.classvar","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"Based species Presence-Absence matrix including variables interest (see lets.addvar), function divides continuous variable classes counts frequency class within species' range.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"","code":"lets.classvar(x, groups = \"default\", pos, xy)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"x Presence-absence matrix single variable added (see lets.addvar). groups number classes variable divided. Default calculates number classes default histogram (hist). pos Column number containing variable interest. xy Logical, TRUE input matrix contains geographic coordinates first two columns.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"matrix species rows variable's classes columns.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"Morales-Castilla et al. 2013. Range size patterns New World oscine passerines (Aves): insights differences among migratory sedentary clades. Journal Biogeography, 40, 2261-2273.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.classvar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Frequency distribution of a variable within a species' range — lets.classvar","text":"","code":"if (FALSE) { data(PAM) data(temp) pamvar <- lets.addvar(PAM, temp) resu <- lets.classvar(x = pamvar, pos = ncol(pamvar), xy = TRUE) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.correl.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute correlogram based on the Moran's I index — lets.correl","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"Computes Moran's correlogram single multiple variables.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.correl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"","code":"lets.correl(x, y, z, equidistant = FALSE, plot = TRUE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.correl.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"x single numeric variable vector format multiple variables matrix format (columns). y distance matrix class matrix dist. z number distance classes use correlogram. equidistant Logical, TRUE classes equidistant. FALSE classes equal number observations. plot Logical, TRUE correlogram ploted.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.correl.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"Returns matrix Moran's Observed value, Confidence Interval (95 Expected value. Also p value randomization test, mean distance classes, number observations. quase tudo","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.correl.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"Sokal, R.R. & Oden, N.L. (1978) Spatial autocorrelation biology. 1. Methodology. Biological Journal Linnean Society, 10, 199-228. Sokal, R.R. & Oden, N.L. (1978) Spatial autocorrelation biology. 2. biological implications four applications evolutionary ecological interest. Biological Journal Linnean Society, 10, 229-249.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.correl.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"Bruno Vilela, Fabricio Villalobos, Lucas Jardim & Jose Alexandre Diniz-Filho","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.correl.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute correlogram based on the Moran's I index — lets.correl","text":"","code":"if (FALSE) { data(PAM) data(IUCN) # Spatial autocorrelation in description year (species level) midpoint <- lets.midpoint(PAM) distan <- lets.distmat(midpoint[, 2:3]) moran <- lets.correl(IUCN$Description, distan, 12, equidistant = FALSE, plot = TRUE) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.distmat.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute a geographic distance matrix — lets.distmat","title":"Compute a geographic distance matrix — lets.distmat","text":"Calculates geographic distance matrix based PresenceAbsence two column matrix x(longitude) y(latitude).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute a geographic distance matrix — lets.distmat","text":"","code":"lets.distmat(xy, asdist = TRUE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute a geographic distance matrix — lets.distmat","text":"xy PresenceAbsence object matrix two columns (longitude, latitude). asdist Logical, TRUE result object class dist, FALSE result object class matrix.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute a geographic distance matrix — lets.distmat","text":"user can choose dist matrix class object returned. resulting values kilometres (see argument 'unit' rdist.earth).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute a geographic distance matrix — lets.distmat","text":"function basically facilitates use terra::distance PresenceAbsence object, allowing also user directly dist object. distance always expressed meter coordinate reference system longitude/latitude, map units otherwise. Map units typically meter, inspect crs(x) doubt.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute a geographic distance matrix — lets.distmat","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.distmat.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute a geographic distance matrix — lets.distmat","text":"","code":"if (FALSE) { data(PAM) distPAM <- lets.distmat(PAM) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.field.html","id":null,"dir":"Reference","previous_headings":"","what":"Create species' values based on the species co-occurrence within focal ranges — lets.field","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"Create single species' values based attributes species co-occurring within individual ranges.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.field.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"","code":"lets.field(x, y, z, weight = TRUE, xy = NULL, count = FALSE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.field.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"x PresenceAbsence object presence-absence matrix format (see xy argument matrix use) species named columns. y Species attribute considered. must numeric attribute. z Species names order attributes exactly named matrix PresenceAbsence object. weight TRUE value weighted species' range size, FALSE value mean species co-occur within focal species. xy TRUE presence-absence matrix contains cell coordinates first two columns. count Logical, TRUE counting window open.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.field.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"species co-occur species NaN returned.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.field.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"Villalobos, F. Arita, H.T. 2010. diversity field New World leaf-nosed bats (Phyllostomidae). Global Ecology Biogeography. 19, 200-211. Villalobos, F., Rangel, T.F., Diniz-Filho, J..F. 2013. Phylogenetic fields species: cross-species patterns phylogenetic structure geographical coexistence. Proceedings Royal Society B. 280, 20122570.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.field.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.field.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create species' values based on the species co-occurrence within focal ranges — lets.field","text":"","code":"if (FALSE) { data(PAM) range <- lets.rangesize(x = PAM, units = \"cell\") field <- lets.field(PAM, range, PAM$S, weight = TRUE) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Fits a grid into a PresenceAbsence object — lets.gridirizer","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"function creates grid shapefile format adds cells' IDs presence-absence matrix. function created facilitate use PresenceAbsence object ones prefer work grid shapefile format.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"","code":"lets.gridirizer(x)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"x PresenceAbsence object.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"result list two objects. first grid shapefile format; second presence-absence matrix aditional column called SP_ID (shapefile cell identifier).","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.gridirizer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Fits a grid into a PresenceAbsence object — lets.gridirizer","text":"","code":"if (FALSE) { data(PAM) PAM.grid <- lets.gridirizer(PAM) names(PAM.grid) # Grid in polygon format (can be saved in shapefile) PAM.grid$Grid # Presence-absence matrix (beggining only) head(PAM.grid$Presence[, 1:5]) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":null,"dir":"Reference","previous_headings":"","what":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"Get species' habitat information IUCN RedList website(https://www.iucnredlist.org/) one species.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"","code":"lets.iucn.ha(input, count = FALSE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"input Character vector one species names, object PresenceAbsence class. count Logical, TRUE counting window open.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"data frame species names first column habitats occurs remaining columns, '1' species present habitat '0' otherwise.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"Note must connected internet use function.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.ha.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download species' habitat information from the IUCN RedList online database\n(No longer supported) — lets.iucn.ha","text":"","code":"if (FALSE) { # Single species lets.iucn.ha(\"Pongo pygmaeus\") # Multiple species sp <- c(\"Musonycteris harrisoni\", \"Ailuropoda melanoleuca\", \"Cebus flavius\") lets.iucn.ha(sp) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":null,"dir":"Reference","previous_headings":"","what":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"Get species conservation status time (.e. 1980 present date available) IUCN website(https://www.iucnredlist.org/) one species.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"","code":"lets.iucn.his(input, count = FALSE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"input character vector one species names, object class PresenceAbsence. count Logical, TRUE counting window open.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"data frame species names first column rows years (1980 - present) remaining columns, code represents species' conservation status (see IUCN RedList website details). species information (.e. evaluated), result : NE (evaluated). Codes categories: EX: Extinct EW: Extinct Wild VU: Vulnerable EN: Endangered CR: Critically Endangered LC: Least Concern NT: Near Threatened DD: Data Deficient CT: Commercially Threatened : Indeterminate IK: Insufficiently Known LR: Lower Risk RA: Rare","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"Note must connected internet use function.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.his.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download species' temporal trend in conservation status from the IUCN RedList online database\n(No longer supported) — lets.iucn.his","text":"","code":"if (FALSE) { # Single species lets.iucn.his(\"Panthera onca\") # Multiple species sp <- c(\"Rhincodon typus\", \"Ailuropoda melanoleuca\") lets.iucn.his(sp) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.html","id":null,"dir":"Reference","previous_headings":"","what":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"Get species' information IUCN website(https://www.iucnredlist.org/) one species.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"","code":"lets.iucn(input, count = FALSE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"input Character vector one species names, object class PresenceAbsence. count Logical, TRUE counting window open.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"Returns data frame Species Name, Family, Conservation Status, Criteria used estabilish conservation status, Population Status, Year Description (animals), Countries occurs. species information (.e. evaluated), result : NE (evaluated).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"Note must connected internet use function.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucn.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download species' information from the IUCN RedList online database \n(No longer supported) — lets.iucn","text":"","code":"if (FALSE) { # Single species lets.iucn(\"Pongo pygmaeus\") # Multiple species sp <- c(\"Musonycteris harrisoni\", \"Ailuropoda melanoleuca\", \"Cebus flavius\") lets.iucn(sp) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"Transform IUCN RedList conservation status continuous values ranging 0 5.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"","code":"lets.iucncont(x, dd = NA, ne = NA)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"x vector matrix containing IUCN codes transformed. dd value attributed DD (data-deficient) species, default option NA. ne value attributed NE (-evaluated) species, default option NA.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"Returns vector/matrix continuos values 0 5. EX EW = 5 CR = 4 EN = 3 VU = 2 NT = 1 LC = 0 DD = NA NE = NA","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"Purvis et al., 2000. Predicting extinction risk declining species. Proceedings Royal Society London. Series B: Biological Sciences, 267.1456: 1947-1952.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.iucncont.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform IUCN RedList conservation status to continuous values — lets.iucncont","text":"","code":"if (FALSE) { #Vector transformation status <- sample(c(\"EN\",\"VU\", \"NT\", \"CR\", \"DD\", \"LC\", \"EX\"), 30, replace = TRUE) transV <- lets.iucncont(status) #matrix transformation data(IUCN) transM <- lets.iucncont(IUCN) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.load.html","id":null,"dir":"Reference","previous_headings":"","what":"Load a PresenceAbsence object — lets.load","title":"Load a PresenceAbsence object — lets.load","text":"Reload PresenceAbsence objects written function lets.save.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.load.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load a PresenceAbsence object — lets.load","text":"","code":"lets.load(file)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.load.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load a PresenceAbsence object — lets.load","text":"file character string giving name file load.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.load.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Load a PresenceAbsence object — lets.load","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.load.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Load a PresenceAbsence object — lets.load","text":"","code":"if (FALSE) { data(PAM) lets.save(PAM, file = \"PAM.RData\") PAM <- lets.load(file = \"PAM.RData\") }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"Summarize species atributes per cell presence-absence matrix.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"","code":"lets.maplizer(x, y, z, func = mean, ras = FALSE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"x PresenceAbsence object. y Species attribute considered. must numeric attribute. z Species names order attributes exactly named PresenceAbsence object. func function summarize species' atribute cell (function must return one value). ras TRUE raster object returned together matrix.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"result can matrix list cointaining follow objects: Matrix: matrix object cells' geographic coordinates summarized species' attributes within . Raster: summarized species'attributed maped SpatRaster object.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.maplizer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a matrix summarizing species' attributes within \ncells of a PresenceAbsence object — lets.maplizer","text":"","code":"if (FALSE) { data(PAM) data(IUCN) trait <- IUCN$Description_Year resu <- lets.maplizer(PAM, trait, PAM$S, ras = TRUE) head(resu$Matrix) plot(resu$Raster, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Mean description year per site\") }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute the midpoint of species' geographic ranges — lets.midpoint","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"Calculate species distribution midpoint presence-absence matrix using several methods.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"","code":"lets.midpoint(pam, planar = FALSE, method = \"PC\", inside = FALSE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"pam presence-absence matrix (sites rows species columns, first two columns containing longitudinal latitudinal coordinates, respectively), object class PresenceAbsence. planar Logical, FALSE coordinates Longitude/Latitude. TRUE coordinates planar. method Default option, \"PC\" (polygon centroid) generate polygon raster, calculate centroid polygon based function terra::centroids. Note \"PC\" method, users can use PresenceAbsence objects. Note also method best PresenceAbsence objects made occurrence records, multiple disjoint distributions. Users can also choose geographic midpoint, using option \"GM\". \"GM\" create bounding box across extremes distribution calculate centroid. Alternatively, midpoint can calculated point minimize distance cells PAM, using method \"CMD\"(centre minimum distance). user can also calculate midpoint, based centroid minimum convex polygon distribution, using method \"MCC\". last method useful using PresenceAbsence object made occurrence records. inside logical. TRUE points returned guaranteed inside polygons lines, true centroids. True centroids may outside polygon, example polygon \"bean shaped\", unlikely line","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"data.frame containing species' names geographic coordinates (longitude [x], latitude [y]) species' midpoints.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"Fabricio Villalobos & Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.midpoint.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute the midpoint of species' geographic ranges — lets.midpoint","text":"","code":"if (FALSE) { data(PAM) mid <- lets.midpoint(PAM, method = \"PC\") mid2 <- lets.midpoint(PAM, method = \"GM\") mid3 <- lets.midpoint(PAM, method = \"CMD\") mid4 <- lets.midpoint(PAM, method = \"MCC\") mid5 <- lets.midpoint(PAM, method = \"PC\", planar = TRUE) mid6 <- lets.midpoint(PAM, method = \"GM\", planar = TRUE) mid7 <- lets.midpoint(PAM, method = \"CMD\", planar = TRUE) mid8 <- lets.midpoint(PAM, method = \"MCC\", planar = TRUE) for (sp in seq_len(nrow(mid))) { #sp = 4 # Or choose a line or species plot(PAM, name = mid[sp, 1]) points(mid[sp, -1], col = adjustcolor(\"blue\", .8), pch = 20, cex = 1.5) points(mid2[sp, -1], col = adjustcolor(\"green\", .8), pch = 20, cex = 1.5) points(mid3[sp, -1], col = adjustcolor(\"yellow\", .8), pch = 20, cex = 1.5) points(mid4[sp, -1], col = adjustcolor(\"purple\", .8), pch = 20, cex = 1.5) points(mid5[sp, -1], col = adjustcolor(\"orange\", .8), pch = 20, cex = 1.5) points(mid6[sp, -1], col = adjustcolor(\"black\", .8), pch = 20, cex = 1.5) points(mid7[sp, -1], col = adjustcolor(\"gray\", .8), pch = 20, cex = 1.5) points(mid8[sp, -1], col = adjustcolor(\"brown\", .8), pch = 20, cex = 1.5) Sys.sleep(1) } }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.overlap.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute pairwise species' geographic overlaps — lets.overlap","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"Creates species geographic overlap matrix Presence-absence matrix.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"","code":"lets.overlap(pam, method = \"Chesser&Zink\", xy = NULL)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"pam presence-absence matrix (sites rows species columns, first two columns containing longitudinal latitudinal coordinates, respectively), object class PresenceAbsence. method method used calculate overlap matrix. \"Chesser&Zink\" calculates degree overlap proportion smaller range overlaps within larger range (Chesser & Zink 1994). \"Proportional\" calculates proportion range overlaps another range, resultant matrix symmetric. \"Cells\" show number overlapping grid cells pair species' ranges (species pair), resultant matrix symmetric. xy Logical, TRUE input matrix contains geographic coordinates first two columns.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"Chesser, R. Terry, Robert M. Zink. \"Modes speciation birds: test Lynch's method.\" Evolution (1994): 490-497. Barraclough, Timothy G., Alfried P. Vogler. \"Detecting geographical pattern speciation species-level phylogenies.\" American Naturalist 155.4 (2000): 419-434.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"Fabricio Villalobos & Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.overlap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute pairwise species' geographic overlaps — lets.overlap","text":"","code":"if (FALSE) { data(PAM) CZ <- lets.overlap(PAM, method = \"Chesser&Zink\") prop <- lets.overlap(PAM, method = \"Proportional\") cells <- lets.overlap(PAM, method = \"Cells\") }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"Convert species' ranges (shapefile format stored particular folders) presence-absence matrix based user-defined grid. function specially designed work BirdLife Intl. shapefiles (https://www.birdlife.org). (Notice new versions birds spatial data similar format groups run using lets.presab function. keep function case someone needs use previous data format.)","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"","code":"lets.presab.birds( path, xmn = NULL, xmx = NULL, ymn = NULL, ymx = NULL, resol = NULL, remove.cells = TRUE, remove.sp = TRUE, show.matrix = FALSE, crs = \"+proj=longlat +datum=WGS84\", crs.grid = crs, cover = 0, presence = NULL, origin = NULL, seasonal = NULL, count = FALSE )"},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"path Path location folders one species' individual shapefiles. Shapefiles one species work function. use multi-species shapefiles see lets.presab. xmn Minimun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. xmx Maximun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymn Minimun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymx Maximun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. resol Numeric vector length 1 2 set grid resolution. NULL, resolution equivalent 1 degree latitude longitude. remove.cells Logical, TRUE final matrix contain cells grid value zero (.e. sites species present). remove.sp Logical, TRUE final matrix contain species match cell grid. show.matrix Logical, TRUE presence-absence matrix returned. crs Character representing PROJ.4 type description Coordinate Reference System (map projection) polygons. crs.grid Character representing PROJ.4 type description Coordinate Reference System (map projection) grid. Note change options may probably change extent coordinates resolution. cover Percentage cell covered shapefile considered presence (values 0 1). presence vector code numbers presence type considered process (IUCN spatial data https://www.iucnredlist.org/resources/spatial-data-download, see metadata). origin vector code numbers origin type considered process (IUCN spatial data). seasonal vector code numbers seasonal type considered process (IUCN spatial data). count Logical, TRUE progress bar indicating processing progress shown.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"result list object class PresenceAbsence following objects: Presence-Absence Matrix: matrix species' presence(1) absence(0) information. first two columns contain longitude (x) latitude (y) cells' centroid ( gridded domain used); Richness Raster: raster containing species richness data; Species name: character vector species' names contained matrix. *see optional argument show.matrix.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"function creates presence-absence matrix based raster file. Depending cell size, extension used number species may require lot memory, may take time process . Thus, process, count argument set TRUE, counting window open can see progress (.e. polygon function working). Note number polygons number species (.e. species may one polygon/shapefiles).","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.birds.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a presence-absence matrix of species' geographic ranges within a grid\nfor the Birdlife spatial data — lets.presab.birds","text":"","code":"if (FALSE) { # Constructing a Presence/Absence matrix for birds # Attention: For your own files, omit the 'system.file' # and 'package=\"letsR\"', these are just to get the path # to files installed with the package. path.Ramphastos <- system.file(\"extdata\", package = \"letsR\") PAM <- lets.presab.birds(path.Ramphastos, xmn = -93, xmx = -29, ymn = -57, ymx = 25) # Species richness map plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Ramphastos species Richness\") }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"Convert species' ranges (shapefile format) presence-absence matrix based grid shapefile format.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"","code":"lets.presab.grid( shapes, grid, sample.unit, remove.sp = TRUE, presence = NULL, origin = NULL, seasonal = NULL )"},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"shapes Object class SpatVect Spatial (see packages terra sf read files) containing distribution one species. Species names stored object BINOMIAL/binomial SCINAME/sciname. grid Object class shapefile representing spatial grid (e.g. regular/irregular cells, political divisions, hexagonal grids, etc). grid shapefiles must projection. sample.unit Object class character name column (grid) representing sample units presence absence matrix. remove.sp Logical, TRUE final matrix contain species match cell grid. presence vector code numbers presence type considered process (IUCN spatial data https://www.iucnredlist.org/resources/spatial-data-download, see metadata). origin vector code numbers origin type considered process (IUCN spatial data). seasonal vector code numbers seasonal type considered process (IUCN spatial data).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"result list containing two objects: () matrix species presence (1) absence (0) values per sample unity. (II) original grid.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"function alternative way create presence absence matrix users already grid.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a presence-absence matrix of species' geographic ranges \nwithin a user's grid shapefile (beta version) — lets.presab.grid","text":"","code":"if (FALSE) { # Species polygons data(\"Phyllomedusa\") data(\"wrld_simpl\") # Grid sp.r <- terra::as.polygons(terra::rast(resol = 5, crs = terra::crs(Phyllomedusa), xmin = -93, xmax = -29, ymin = -57, ymax = 15)) sp.r$ID <- 1:length(sp.r) # PAM resu <- lets.presab.grid(Phyllomedusa, sp.r, \"ID\") # Plot rich_plus1 <- rowSums(resu$PAM[, -1]) + 1 colfunc <- colorRampPalette(c(\"#fff5f0\", \"#fb6a4a\", \"#67000d\")) colors <- c(\"white\", colfunc(max(rich_plus1))) plot(resu$grid, border = \"gray40\", col = colors[rich_plus1]) plot(sf::st_geometry(wrld_simpl), add = TRUE) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"Convert species' ranges (shapefile format) presence-absence matrix based user-defined grid system","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"","code":"lets.presab( shapes, xmn = NULL, xmx = NULL, ymn = NULL, ymx = NULL, resol = NULL, remove.cells = TRUE, remove.sp = TRUE, show.matrix = FALSE, crs = \"+proj=longlat +datum=WGS84\", crs.grid = crs, cover = 0, presence = NULL, origin = NULL, seasonal = NULL, count = FALSE )"},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"shapes Object class SpatVect Spatial (see packages terra sf read files) containing distribution one species. Species names stored object BINOMIAL/binomial SCINAME/sciname. xmn Minimun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. xmx Maximun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymn Minimun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymx Maximun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. resol Numeric vector length 1 2 set grid resolution. NULL, resolution equivalent 1 degree latitude longitude. remove.cells Logical, TRUE final matrix contain cells grid value zero (.e. sites species present). remove.sp Logical, TRUE final matrix contain species match cell grid. show.matrix Logical, TRUE presence-absence matrix returned. crs Character representing PROJ.4 type description Coordinate Reference System (map projection) polygons. crs.grid Character representing PROJ.4 type description Coordinate Reference System (map projection) grid. Note change options may probably change extent coordinates resolution. cover Percentage cell covered shapefile considered presence (values 0 1). presence vector code numbers presence type considered process (IUCN spatial data https://www.iucnredlist.org/resources/spatial-data-download, see metadata). origin vector code numbers origin type considered process (IUCN spatial data). seasonal vector code numbers seasonal type considered process (IUCN spatial data). count Logical, TRUE progress bar indicating processing progress shown.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"result list object class PresenceAbsence following objects: Presence-Absence Matrix: matrix species' presence(1) absence(0) information. first two columns contain longitude (x) latitude (y) cells' centroid ( gridded domain used); Richness Raster: raster containing species richness data; Species name: character vector species' names contained matrix. *see optional argument show.matrix.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"function creates presence-absence matrix based raster object. Depending cell size, extension used number species may require lot memory, may take time process . Thus, process, count argument set TRUE, counting window open can see progress (.e. polygon/shapefile function working). Note number polygons number species (.e. species may one polygon/shapefiles).","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a presence-absence matrix of species' geographic ranges within a grid — lets.presab","text":"","code":"if (FALSE) { # Spatial distribution polygons of south american frogs # of genus Phyllomedusa. data(Phyllomedusa) PAM <- lets.presab(Phyllomedusa) summary(PAM) # Species richness map plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") # Map of the specific species plot(PAM, name = \"Phyllomedusa nordestina\") }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"Convert species' occurrences presence-absence matrix based user-defined grid.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"","code":"lets.presab.points( xy, species, xmn = NULL, xmx = NULL, ymn = NULL, ymx = NULL, resol = NULL, remove.cells = TRUE, remove.sp = TRUE, show.matrix = FALSE, crs = \"+proj=longlat +datum=WGS84\", count = FALSE )"},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"xy matrix geographic coordinates species occurrences, first column longitude (x), second latitude (y). species Character vector species names, order coordinates. xmn Minimun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. xmx Maximun longitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymn Minimun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. ymx Maximun latitude used construct grid matrix based (.e. [gridded] geographic domain interest). NULL, limits calculated based limits shapes object. resol Numeric vector length 1 2 set grid resolution. NULL, resolution equivalent 1 degree latitude longitude. remove.cells Logical, TRUE final matrix contain cells grid value zero (.e. sites species present). remove.sp Logical, TRUE final matrix contain species match cell grid. show.matrix Logical, TRUE presence-absence matrix returned. crs Character representing PROJ.4 type description Coordinate Reference System (map projection) polygons. count Logical, TRUE progress bar indicating processing progress shown.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"result list object class PresenceAbsence following objects: Presence-Absence Matrix: matrix species' presence(1) absence(0) information. first two columns contain longitude (x) latitude (y) cells' centroid ( gridded domain used); Richness Raster: raster containing species richness data; Species name: character vector species' names contained matrix. *see optional argument show.matrix.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"function creates presence-absence matrix based raster file. Depending cell size, extension used number species may require lot memory, may take time process . Thus, process, count argument set TRUE, counting window open can see progress (.e. polygon function working). Note number polygons number species (.e. species may one polygon/shapefiles).","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.presab.points.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a presence-absence matrix based on species' point occurrences — lets.presab.points","text":"","code":"if (FALSE) { species <- c(rep(\"sp1\", 100), rep(\"sp2\", 100), rep(\"sp3\", 100), rep(\"sp4\", 100)) x <- runif(400, min = -69, max = -51) y <- runif(400, min = -23, max = -4) xy <- cbind(x, y) PAM <- lets.presab.points(xy, species, xmn = -93, xmx = -29, ymn = -57, ymx = 15) summary(PAM) # Species richness map plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Species richness map (simulated)\") # Map of the specific species plot(PAM, name = \"sp1\") }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute species' geographic range sizes — lets.rangesize","title":"Compute species' geographic range sizes — lets.rangesize","text":"function calculates species' range sizes PresenceAbsence object directly species' shapefiles.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute species' geographic range sizes — lets.rangesize","text":"","code":"lets.rangesize( x, species_name = NULL, coordinates = \"geographic\", units = \"cell\" )"},{"path":"https://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute species' geographic range sizes — lets.rangesize","text":"x PresenceAbsence SpatVector object. species_name Species names order SpatVector (needed x SpatVector). coordinates \"geographical\" \"planar\". Indicate whether shapefile geographical planar coordinates(needed x SpatVector). units \"cell\" \"squaremeter\". Indicate size units wanted number cells occupied square meters(needed x PresenceAbsence object).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute species' geographic range sizes — lets.rangesize","text":"result matrix range size species. range size accounts earth curvature (Yes ) size unit may differ argument combination: 1) SpatVector & geographical = Square meters. Yes. 2) SpatVector & planar = Square meters. . 3) PresenceAbsence & cell = number cells. . 4) PresenceAbsence & squaremeter = Square meters. Yes.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Compute species' geographic range sizes — lets.rangesize","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.rangesize.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Compute species' geographic range sizes — lets.rangesize","text":"","code":"if (FALSE) { # SpatialPolygonsDataFrame & geographical data(Phyllomedusa) rangesize <- lets.rangesize(x = Phyllomedusa, coordinates = \"geographic\") # SpatialPolygonsDataFrame & planar rangesize2 <- lets.rangesize(x = Phyllomedusa, coordinates = \"planar\") # PresenceAbsence & cell data(PAM) rangesize3 <- lets.rangesize(x = PAM, units = \"cell\") # PresenceAbsence & squaremeter rangesize4 <- lets.rangesize(x = PAM, units = \"squaremeter\") }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.save.html","id":null,"dir":"Reference","previous_headings":"","what":"Save a PresenceAbsence object — lets.save","title":"Save a PresenceAbsence object — lets.save","text":"Save external representation PresenceAbsence object specified file. object can read back file later date using function lets.load.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.save.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save a PresenceAbsence object — lets.save","text":"","code":"lets.save(pam, ...)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.save.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save a PresenceAbsence object — lets.save","text":"pam PresenceAbsence object. ... arguments passed function save","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.save.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Save a PresenceAbsence object — lets.save","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.save.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Save a PresenceAbsence object — lets.save","text":"","code":"if (FALSE) { data(PAM) lets.save(PAM, file = \"PAM.RData\") PAM <- lets.load(file = \"PAM.RData\") }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":null,"dir":"Reference","previous_headings":"","what":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"Filter species shapefiles origin, presence, seasonal type (following IUCN types: https://www.iucnredlist.org/resources/spatial-data-download, see metadata).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"","code":"lets.shFilter(shapes, presence = NULL, origin = NULL, seasonal = NULL)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"shapes Object class SpatVect Spatial (see packages terra sf read files) containing distribution one species. Species names stored object BINOMIAL/binomial SCINAME/sciname. presence vector code numbers presence type considered process (IUCN spatial data https://www.iucnredlist.org/resources/spatial-data-download, see metadata). origin vector code numbers origin type considered process (IUCN spatial data). seasonal vector code numbers seasonal type considered process (IUCN spatial data).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"result shapefile(s) filtered according selected types. filters remove polygons, result NULL.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"Presence codes: (1) Extant, (2) Probably Extant, (3) Possibly Extant, (4) Possibly Extinct, (5) Extinct (post 1500) & (6) Presence Uncertain. Origin codes: (1) Native, (2) Reintroduced, (3) Introduced, (4) Vagrant & (5) Origin Uncertain. Seasonal codes: (1) Resident, (2) Breeding Season, (3) Non-breeding Season, (4) Passage & (5) Seasonal Occurrence Uncertain. info shapefiles' metadata.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.shFilter.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Filter species' shapefiles based on its presence, origin, and season — lets.shFilter","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":null,"dir":"Reference","previous_headings":"","what":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"Subset PresenceAbsence object based species character vector provided user.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"","code":"lets.subsetPAM(x, names, remove.cells = TRUE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"x PresenceAbsence object. names Character vector species names subset PresenceAbsence object. remove.cells Logical, TRUE final matrix contain cells grid value zero (.e. sites species present).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"result object class PresenceAbsence subseted.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.subsetPAM.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Subset a PresenceAbsence object based on species names — lets.subsetPAM","text":"","code":"if (FALSE) { data(PAM) # PAM before subset plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") # Subset PAM to the first 20 species PAMsub <- lets.subsetPAM(PAM, PAM[[3]][1:20]) plot(PAMsub, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":null,"dir":"Reference","previous_headings":"","what":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"Based Presence-Absence matrix added variables (see lets.addvar), function summarizes values variable(s) per species (across species' occupied cells. .e. within ranges).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"","code":"lets.summarizer(x, pos, xy = TRUE, fun = mean, ...)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"x Presence-absence matrix variables added. pos Column position variables interest. xy Logical, TRUE input matrix contains geographic coordinates first two columns. fun Function used summarize variable per species. Default mean. ... parameters passed function defined fun.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"Villalobos, F. Arita, H.T. 2010. diversity field New World leaf-nosed bats (Phyllostomidae). Global Ecology Biogeography. 19, 200-211.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"Bruno Vilela & Fabricio Villalobos","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.summarizer.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Summarize variable(s) values in a presence-absence matrix within species' ranges — lets.summarizer","text":"","code":"if (FALSE) { data(PAM) data(temp) temp <- terra::unwrap(temp) pamvar <- lets.addvar(PAM, temp) resu <- lets.summarizer(x = pamvar, pos = ncol(pamvar), xy = TRUE) }"},{"path":"https://brunovilela.github.io/letsR/reference/lets.transf.html","id":null,"dir":"Reference","previous_headings":"","what":"Transform values of a vector — lets.transf","title":"Transform values of a vector — lets.transf","text":"Transform element vector.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.transf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Transform values of a vector — lets.transf","text":"","code":"lets.transf(x, y, z, NUMERIC = TRUE)"},{"path":"https://brunovilela.github.io/letsR/reference/lets.transf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Transform values of a vector — lets.transf","text":"x vector transformed. y levels transformed. z value atributed level (order y). NUMERIC logical, TRUE z considered numbers.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.transf.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Transform values of a vector — lets.transf","text":"Return vector changed values.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.transf.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Transform values of a vector — lets.transf","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/lets.transf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Transform values of a vector — lets.transf","text":"","code":"if (FALSE) { status <- sample(c(\"EN\",\"VU\", \"NT\", \"CR\", \"DD\", \"LC\"), 30, replace=TRUE) TE <- \"Threatened\" NT <- \"Non-Threatened\" new <- c(TE, TE, NT, TE, \"Data Deficient\", NT) old <- c(\"EN\",\"VU\", \"NT\", \"CR\", \"DD\", \"LC\") statustrans <- lets.transf(status, old, new, NUMERIC=FALSE) }"},{"path":"https://brunovilela.github.io/letsR/reference/letsR-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","title":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","text":"letsR package developed help researchers handling, processing, analysis macroecological data. purpose integrate methodological processes single software platform macroecological analyses. package's main functions allow users build presence-absence matrices, basic analytical tool macroecology, species' geographical distributions merge species' traits, conservation information (downloadable using functions package) spatial environmental layers. addition, package's functions enable users summarize visualize information presence-absence matrices.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/letsR-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","text":"functions package use prefix suffix separated dot. prefix refers package's name suffix actual function. done avoid confusion potentially similarly-named functions R packages. instance, letsR function used create presence-absence matrices called lets.presab (see also lets.presab.birds lets.presab.points) whereas one used add variables presence-absence matrix called lets.addvar. package's basic functions create work particular S3 object class called PresenceAbsence. PresenceAbsence object class allows storing information beyond presence-absence data (e.g. user-defined grid-cell system) using generic plot, summary print functions R. Also, package's functions allow user input customary R objects (e.g. vector, matrix, data.frame). Another set functions package allow user download species' information related description conservation status provided IUCN's REdList database (lets.iucn, lets.iucn.ha, lets.iucn.). , functions use IUCN's RedList API retrieve information webpage. looking recent version package, can get development version letsR github (https://github.com/macroecology/letsR).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/letsR-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","text":"Vilela, B., & Villalobos, F. (2015). letsR: new R package data handling analysis macroecology. Methods Ecology Evolution.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/letsR-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Tools for Data Handling and Analysis in Macroecology. — letsR-package","text":"Bruno Vilela (email: bvilela@wustl.edu; Website: https://bvilela.weebly.com/) Fabricio Villalobos (email: fabricio.villalobos@gmail.com; Website: https://fabro.github.io)","code":""},{"path":"https://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"Plots species richness map object class PresenceAbsence particular species' map.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"","code":"# S3 method for PresenceAbsence plot(x, name = NULL, world = TRUE, col_rich = NULL, col_name = \"red\", ...)"},{"path":"https://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"x object class PresenceAbsence. name character specifying species ploted instead complete species richness map. world TURE map political divisions (countries) added plot. col_rich Color function (e.g. rainbow, heat.colors, colorRampPalette) used richness map. col_name color use ploting single species. ... parameters pass plot function.","code":""},{"path":[]},{"path":"https://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Plot an object of class PresenceAbsence — plot.PresenceAbsence","text":"","code":"if (FALSE) { data(PAM) plot(PAM) plot(PAM, xlab = \"Longitude\", ylab = \"Latitude\", main = \"Phyllomedusa species richness\") plot(PAM, name = \"Phyllomedusa atelopoides\") plot(PAM, name = \"Phyllomedusa azurea\") }"},{"path":"https://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"Print for object of class PresenceAbsence — print.PresenceAbsence","title":"Print for object of class PresenceAbsence — print.PresenceAbsence","text":"Print objects class PresenceAbsence.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print for object of class PresenceAbsence — print.PresenceAbsence","text":"","code":"# S3 method for PresenceAbsence print(x, ...)"},{"path":"https://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print for object of class PresenceAbsence — print.PresenceAbsence","text":"x object class PresenceAbsence. ... print parameters.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print for object of class PresenceAbsence — print.PresenceAbsence","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","title":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","text":"Print summary objects class PresenceAbsence.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","text":"","code":"# S3 method for PresenceAbsence print.summary(x, ...)"},{"path":"https://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","text":"x object class PresenceAbsence. ... print parameters.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Print summary for object of class PresenceAbsence — print.summary.PresenceAbsence","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html","id":null,"dir":"Reference","previous_headings":"","what":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","title":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","text":"Summary objects class PresenceAbsence.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","text":"","code":"# S3 method for PresenceAbsence summary(object, ...)"},{"path":"https://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","text":"object object class PresenceAbsence. ... additional arguments affecting summary produced.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Summary for object of class PresenceAbsence — summary.PresenceAbsence","text":"Bruno Vilela","code":""},{"path":"https://brunovilela.github.io/letsR/reference/temp.html","id":null,"dir":"Reference","previous_headings":"","what":"Avarege temperature raster for the world. — temp","title":"Avarege temperature raster for the world. — temp","text":"Average temperature raster Celsius degrees(multiplied 100) world 10 arc min resolution. Data modfied WorldClim (https://worldclim.com/, downloaded 05/2014).","code":""},{"path":"https://brunovilela.github.io/letsR/reference/temp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Avarege temperature raster for the world. — temp","text":"","code":"data(temp)"},{"path":"https://brunovilela.github.io/letsR/reference/temp.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Avarege temperature raster for the world. — temp","text":"Hijmans, R.J., S.E. Cameron, J.L. Parra, P.G. Jones . Jarvis, 2005. high resolution interpolated climate surfaces global land areas. International Journal Climatology 25: 1965-1978.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/wrld_simpl.html","id":null,"dir":"Reference","previous_headings":"","what":"Simplified world country polygons — wrld_simpl","title":"Simplified world country polygons — wrld_simpl","text":"Shapefile sf format. object obtained maptools package converted sf.","code":""},{"path":"https://brunovilela.github.io/letsR/reference/wrld_simpl.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Simplified world country polygons — wrld_simpl","text":"","code":"data(temp)"},{"path":"https://brunovilela.github.io/letsR/reference/wrld_simpl.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Simplified world country polygons — wrld_simpl","text":"Originally “https://mappinghacks.com/data/TM_WORLD_BORDERS_SIMPL-0.2.zip”, now available https://github.com/nasa/World-Wind-Java/tree/master/WorldWind/testData/shapefiles","code":""}] diff --git a/sitemap.xml b/sitemap.xml index d4b7644..efe23c6 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -1,147 +1,147 @@ - http://brunovilela.github.io/letsR/404.html + https://brunovilela.github.io/letsR/404.html - http://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html + https://brunovilela.github.io/letsR/articles/A-guide-to-transform-species-distributions-into-a-presence-absence-matrix-based.html - http://brunovilela.github.io/letsR/articles/Adding-variables-to-a-presenceabsence-object.html + https://brunovilela.github.io/letsR/articles/Adding-variables-to-a-presenceabsence-object.html - http://brunovilela.github.io/letsR/articles/cropping-and-subseting-your-presence-absence-matrix.html + https://brunovilela.github.io/letsR/articles/cropping-and-subseting-your-presence-absence-matrix.html - http://brunovilela.github.io/letsR/articles/index.html + https://brunovilela.github.io/letsR/articles/index.html - http://brunovilela.github.io/letsR/articles/mapping-species-traits.html + https://brunovilela.github.io/letsR/articles/mapping-species-traits.html - http://brunovilela.github.io/letsR/articles/save-load-presenceabsence.html + https://brunovilela.github.io/letsR/articles/save-load-presenceabsence.html - http://brunovilela.github.io/letsR/articles/species-level-macroecological-analysis.html + https://brunovilela.github.io/letsR/articles/species-level-macroecological-analysis.html - http://brunovilela.github.io/letsR/authors.html + https://brunovilela.github.io/letsR/authors.html - http://brunovilela.github.io/letsR/index.html + https://brunovilela.github.io/letsR/index.html - http://brunovilela.github.io/letsR/reference/PAM.html + https://brunovilela.github.io/letsR/reference/PAM.html - http://brunovilela.github.io/letsR/reference/Phyllomedusa.html + https://brunovilela.github.io/letsR/reference/Phyllomedusa.html - http://brunovilela.github.io/letsR/reference/PresenceAbsence.html + https://brunovilela.github.io/letsR/reference/PresenceAbsence.html - http://brunovilela.github.io/letsR/reference/index.html + https://brunovilela.github.io/letsR/reference/index.html - http://brunovilela.github.io/letsR/reference/iucn.html + https://brunovilela.github.io/letsR/reference/iucn.html - http://brunovilela.github.io/letsR/reference/lets.PAMcrop.html + https://brunovilela.github.io/letsR/reference/lets.PAMcrop.html - http://brunovilela.github.io/letsR/reference/lets.addpoly.html + https://brunovilela.github.io/letsR/reference/lets.addpoly.html - http://brunovilela.github.io/letsR/reference/lets.addvar.html + https://brunovilela.github.io/letsR/reference/lets.addvar.html - http://brunovilela.github.io/letsR/reference/lets.classvar.html + https://brunovilela.github.io/letsR/reference/lets.classvar.html - http://brunovilela.github.io/letsR/reference/lets.correl.html + https://brunovilela.github.io/letsR/reference/lets.correl.html - http://brunovilela.github.io/letsR/reference/lets.distmat.html + https://brunovilela.github.io/letsR/reference/lets.distmat.html - http://brunovilela.github.io/letsR/reference/lets.field.html + https://brunovilela.github.io/letsR/reference/lets.field.html - http://brunovilela.github.io/letsR/reference/lets.gridirizer.html + https://brunovilela.github.io/letsR/reference/lets.gridirizer.html - http://brunovilela.github.io/letsR/reference/lets.iucn.ha.html + https://brunovilela.github.io/letsR/reference/lets.iucn.ha.html - http://brunovilela.github.io/letsR/reference/lets.iucn.his.html + https://brunovilela.github.io/letsR/reference/lets.iucn.his.html - http://brunovilela.github.io/letsR/reference/lets.iucn.html + https://brunovilela.github.io/letsR/reference/lets.iucn.html - http://brunovilela.github.io/letsR/reference/lets.iucncont.html + https://brunovilela.github.io/letsR/reference/lets.iucncont.html - http://brunovilela.github.io/letsR/reference/lets.load.html + https://brunovilela.github.io/letsR/reference/lets.load.html - http://brunovilela.github.io/letsR/reference/lets.maplizer.html + https://brunovilela.github.io/letsR/reference/lets.maplizer.html - http://brunovilela.github.io/letsR/reference/lets.midpoint.html + https://brunovilela.github.io/letsR/reference/lets.midpoint.html - http://brunovilela.github.io/letsR/reference/lets.overlap.html + https://brunovilela.github.io/letsR/reference/lets.overlap.html - http://brunovilela.github.io/letsR/reference/lets.presab.birds.html + https://brunovilela.github.io/letsR/reference/lets.presab.birds.html - http://brunovilela.github.io/letsR/reference/lets.presab.grid.html + https://brunovilela.github.io/letsR/reference/lets.presab.grid.html - http://brunovilela.github.io/letsR/reference/lets.presab.html + https://brunovilela.github.io/letsR/reference/lets.presab.html - http://brunovilela.github.io/letsR/reference/lets.presab.points.html + https://brunovilela.github.io/letsR/reference/lets.presab.points.html - http://brunovilela.github.io/letsR/reference/lets.rangesize.html + https://brunovilela.github.io/letsR/reference/lets.rangesize.html - http://brunovilela.github.io/letsR/reference/lets.save.html + https://brunovilela.github.io/letsR/reference/lets.save.html - http://brunovilela.github.io/letsR/reference/lets.shFilter.html + https://brunovilela.github.io/letsR/reference/lets.shFilter.html - http://brunovilela.github.io/letsR/reference/lets.subsetPAM.html + https://brunovilela.github.io/letsR/reference/lets.subsetPAM.html - http://brunovilela.github.io/letsR/reference/lets.summarizer.html + https://brunovilela.github.io/letsR/reference/lets.summarizer.html - http://brunovilela.github.io/letsR/reference/lets.transf.html + https://brunovilela.github.io/letsR/reference/lets.transf.html - http://brunovilela.github.io/letsR/reference/letsR-package.html + https://brunovilela.github.io/letsR/reference/letsR-package.html - http://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html + https://brunovilela.github.io/letsR/reference/plot.PresenceAbsence.html - http://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html + https://brunovilela.github.io/letsR/reference/print.PresenceAbsence.html - http://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html + https://brunovilela.github.io/letsR/reference/print.summary.PresenceAbsence.html - http://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html + https://brunovilela.github.io/letsR/reference/summary.PresenceAbsence.html - http://brunovilela.github.io/letsR/reference/temp.html + https://brunovilela.github.io/letsR/reference/temp.html - http://brunovilela.github.io/letsR/reference/wrld_simpl.html + https://brunovilela.github.io/letsR/reference/wrld_simpl.html