Skip to content

Bee-plant interaction webs in the Colombian tropical dry forest

Notifications You must be signed in to change notification settings

AndresHerrera2023/beewebs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

---
authors: "Jennifer Ramos, Andres Herrera, Anahi Quezada"
date: "2024-11-14"
output:
  pdf_document 
---

## Github Workshop
## Interaction web

Interaction network analyses are a useful tool to understand the complex tropic relationships between two or more species. Bipartite networks are generally used, which present only two tropic levels. These networks quantify the number and intensity of interactions between the two tropic levels, allowing to visualize and quantify which species in a community have a greater relative interaction than the other species. In this case, we present the interaction networks between several bees from different dry forests at the tribe scale versus the plant families they visit. In this example we show two types of networks: the bipartite networks (plot web) where the linear interactions between the two tropic levels are presented and the matrix (visweb) where the intensity of the interaction between the tropic levels is shown with predetermined colors.


```{r setup, eval=FALSE}
input <- list.files(path = "C:/input/", pattern = ".csv$", full.names = TRUE)
names <- list.files(path = "C:/input/", pattern = ".csv$", full.names = FALSE)
Finalnam <- paste0("C:/metrics_", names) # Create output folder

for (i in 1:length(input)) {
  matrix <- read.csv(input[i]) # Corrected variable name
  matrix <- as.data.frame(matrix)
  matrix <- matrix %>%
    group_by(Tribe) %>%
    summarise(across(everything(), sum, na.rm = TRUE))
  matriz_values <- matrix[, 2:ncol(matrix)]
  final_values <- as.matrix(matriz_values)
  rownames(final_values) <- matrix$Tribe
  net <- networklevel(final_values) # Ensure networklevel() is defined
  write.csv(net, Finalnam[i], row.names = TRUE)
}

```


## Study area

This applied example was made in the Dry Forest of Colombia:

![Study Area](C:/Users/asque/Downloads/IMG_20241120_163851_425.jpg)


## Some plots 

## View the HTML file
[click here to view the HTML file] (https://github.com/AndresHerrera2023/beewebs/blob/main/1.html)

About

Bee-plant interaction webs in the Colombian tropical dry forest

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published