Project_WorkshopR

Create a compendium for the project

make_compendium(name = "project_workshop", 

                path = "/Users/daril/Documents/R", 

                format = "sketchy", 

                Rproj = TRUE, 

                git = TRUE)

Analysis

Upload the data from excel

data_aves <- read.csv("/Users/daril/Documents/R/project_workshop/data/raw/aves.fragmentos.csv")

Among the data obtained, density is the response variable that will be used for the analysis.

data_aves$densidad
 [1]  5.3  2.0  1.5 17.1 13.8 14.1  3.8  2.2  3.3  3.0 27.6  1.8 21.2 14.6  8.0
[16]  3.5 29.0  2.9 24.3 19.4 24.4  5.0 15.8 25.3 19.5 20.9 16.3 18.8 19.9 13.0
[31]  6.8 21.7 27.8 26.8 16.6 30.4 11.5 26.0 25.7 12.7 23.5 24.9 29.0 28.3 28.3
[46] 32.0 37.7 39.6 29.6 31.0 34.4 27.3 30.5 33.0 29.5 30.9

First, an analysis of the density of birds will be carried out in relation to the altitude of the studied plot.

plot(data_aves$densidad, data_aves$altitud, main = "Density vs altitude", xlab = "Altitude of the plots", ylab = "Density of the birds")

Then an analysis was carried out comparing the density based on the intensity of grazing.

plot(data_aves$densidad, data_aves$pastoreo, main = "Density vs grazing", xlab = "Intensity of grazing", ylab = "Density of the birds")

The graph obtained was not very attractive or easy to analyze, so the grazing variable was identified as a factor, a bar graph was made with ggplot and we added color on it.

library(ggplot2)
Warning: package 'ggplot2' was built under R version 4.3.3
ggplot(data = data_aves, aes(pastoreo, densidad, fill = pastoreo)) + 
    geom_col()

When observing the previous graph, it could be assumed that the lower the intensity of grazing, the higher the density of birds.