# Will only run if GRASS is running
if(check_running()){
# Load data set
dem <- system.file("extdata", "dem.tif", package = "rdwplus")
# Set environment
set_envir(dem)
# Make an integer-valued version of 'dem.tif'
convert_to_integer("dem.tif", "int_dem.tif")
# Compare
plot_GRASS("dem.tif")
plot_GRASS("int_dem.tif")
}
Run the code above in your browser using DataLab