I try to use resample in terra with a median method and I get the following message "Error: [resample] " . Other methods works fine :
library(terra)
x <- rast( xmin=0, xmax=200, ymin=0, ymax=200,crs="epsg:2948", resolution=20)
y <- rast( xmin=0, xmax=200, ymin=0, ymax=200,crs="epsg:2948", resolution=10)
values(x)<-runif(100)
resample(x,y,method="q1") # works fine
resample(x,y,method="med") # not working