apsimwise is a collection of interoperable R packages for crop modelling, weather analysis, and agricultural decision support.
The goal of apsimwise is to provide a consistent and user-friendly interface to APSIM-related workflows, allowing researchers, students, breeders, agronomists, and consultants to work with multiple crops using a common set of tools.
From GitHub for the latest development version:
remotes::install_github("byzheng/apsimwise")library(apsimwise)This package installs and loads the core apsimwise ecosystem, including:
- tidyweather for weather data analysis.
- rapsimng for manipulating APSIM Next Generation.
- Packages for specific crops, including:
- rapsimng.wheat for Wheat
- rapsimng.canola for Canola
- rapsimng.chickpea for Chickpea
- rapsimng.fababean for Faba Bean
- rapsimng.lentil for Lentil
- rapsimng.lupin for Lupin
- additional crop packages as they become available
apsimwise re-exports commonly used functions from the ecosystem so that most users only need to load a single package.
library(apsimwise)
# Read weather data
met <- read_weather("weather.met")
# Calculate day length
day_length(
date = met$date,
latitude = -27
)
# Calculate thermal time using crop-specific defaults
thermal_time(
mint = met$mint,
maxt = met$maxt,
date = met$date,
latitude = -27,
crop = "lupin"
)
# View crop-specific parameters
crop("lupin")$get()For a complete list of functions, see the package documentation:
help(package = "apsimwise")