.noGenerics <- TRUE

.onUnload <- function(libpath)
    library.dynam.unload("nnet", libpath)

.getXlevels <- function(Terms, m)
{
    xvars <- as.character(attr(Terms, "variables"))[-1]
    if((yvar <- attr(Terms, "response")) > 0) xvars <- xvars[-yvar]
    if(length(xvars) > 0) {
        xlev <- lapply(m[xvars], levels)
        xlev[!sapply(xlev, is.null)]
    } else NULL
}
