# Extract file path for sample ecotype file path
sample_eco_file <- system.file('extdata','SAMPLE.ECO',package='DSSAT')
# Read sample ecotype file
eco <- read_eco(sample_eco_file)
# Create example ecotype file path
sample_eco_file2 <- paste0(tempdir(),'/SAMPLE.ECO')
# Write out sample ecotype file
write_eco(eco,sample_eco_file2)
Run the code above in your browser using DataLab