#' This is a constructor function.
#'
#'
#'This function will create a list output.
#'
#' @param x vector of independant data
#' @param y vector of dependant data
#'
#' @return a list of data and lm object
#' @export
#'
#' @examples
#' myconstr(x,y)
#'
myconstr = function(x, y){
ylm = lm(y~x)
obj = list(data = list(x = x, y = y), ylm = ylm)
class(obj) = "constr"
obj
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.