A <- function(f){ lh(a=f,...(ther parameters)) } B <- function(t){ -log(t(f=t)) } start = (some value) nlm(B,p=c(start))