# Using Nelder-Mead algorithm for minimizing the sum of absolute deviations from the residuals

How can I minimize the sum of absolute deviations from the residuals using the function optim() with the Nelder-Mead algorithm for creating the estimation in R?

tlad <- function(y = "farm", x = "land", data="FarmLandArea.csv")
{
fit<-lm(dat$farm~dat$land)