fun <- function(x,levels=levels(x)){ blah blah blah }
fun <- function(x,y=getOption('fun.y','initialDefault')){# or getOption('pkg.fun.y',defaultValue) blah blah blah }