R/get_nls_data.R

Defines functions get_nls_data

# This function rather clumsily extracts the covariate data from an nls object.
get_nls_data <- function(m){
  elements <- as.list(m[["m"]][["getEnv"]]())
  elements[["(weights)"]] <- NULL
  elements <- elements[unlist(lapply(elements, function(x) if(length(x) == 1) FALSE else TRUE))]
  return(as.data.frame(elements))
}

Try the distfreereg package in your browser

Any scripts or data that you put into this service are public.

distfreereg documentation built on April 4, 2025, 12:30 a.m.