# Extract file path for sample soil file
sample_sol <- system.file('extdata','SAMPLE.SOL',package='DSSAT')
# Read sample soil file
sol <- read_sol(sample_sol)
# Create example soil file path
sample_sol2 <- paste0(tempdir(),'/SAMPLE.SOL')
# Write example soil file
write_sol(sol,sample_sol2)
Run the code above in your browser using DataLab