# NOT RUN {
######################################################################
#Example 1: We consider a population of Macrolophus pygmaeus whose
#intrinsic growth rate is adjusted to the data obtained from Rezende
#and Bozinovic (2019).
#######################################################################
github_link <- "https://github.com/Victor-Saldana/epcc/raw/main/M_pygmaeus.xlsx"
library(httr)
temp_file <- tempfile(fileext = ".xlsx")
req <- GET(github_link,
authenticate(Sys.getenv("GITHUB_PAT"), ""),
write_disk(path = temp_file))
M_pygmaeus <- readxl::read_excel(temp_file)
TPC <- rate_adjustment(data = M_pygmaeus)
######################################################################
#Example 2: We consider a population of Eretmocerus furuhashii whose
#intrinsic growth rate is adjusted to the data obtained from Rezende
#and Bozinovic (2019).
#######################################################################
github_link <- "https://github.com/Victor-Saldana/epcc/raw/main/E_furuhashii.xlsx"
library(httr)
temp_file <- tempfile(fileext = ".xlsx")
req <- GET(github_link,
authenticate(Sys.getenv("GITHUB_PAT"), ""),
write_disk(path = temp_file))
E_furuhashii <- readxl::read_excel(temp_file)
TPC <- rate_adjustment(data = E_furuhashii)
######################################################################
#Example 3: We consider a population of Trichogramma pretoisum whose
#intrinsic growth rate is adjusted to the data obtained from Rezende
#and Bozinovic (2019).
#######################################################################
github_link <- "https://github.com/Victor-Saldana/epcc/raw/main/T_pretoisum.xlsx"
library(httr)
temp_file <- tempfile(fileext = ".xlsx")
req <- GET(github_link,
authenticate(Sys.getenv("GITHUB_PAT"), ""),
write_disk(path = temp_file))
T_pretoisum <- readxl::read_excel(temp_file)
TPC <- rate_adjustment(data = T_pretoisum)
# }
Run the code above in your browser using DataLab