From 6c3d2ff1cb9e7bd3bf1426e1ec4cecd0891ea089 Mon Sep 17 00:00:00 2001 From: Gertjan van den Burg Date: Wed, 10 Feb 2016 20:19:51 -0500 Subject: bugfixes, documentation improvements, and generic function agreement --- R/print.sparsestep.R | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'R/print.sparsestep.R') diff --git a/R/print.sparsestep.R b/R/print.sparsestep.R index 336d705..549815b 100644 --- a/R/print.sparsestep.R +++ b/R/print.sparsestep.R @@ -2,23 +2,23 @@ #' #' @description Prints a short text of a fitted SparseStep model #' -#' @param obj a "sparsestep" object to print +#' @param x a "sparsestep" object to print +#' @param ... further argument are ignored #' #' @export #' #' @aliases print #' #' @examples -#' data(diabetes) -#' attach(diabetes) -#' object <- sparsestep(x, y) -#' print(object) -#' detach(diabetes) +#' x <- matrix(rnorm(100*20), 100, 20) +#' y <- rnorm(100) +#' fit <- sparsestep(x, y) +#' print(fit) #' -print.sparsestep <- function(obj, ...) +print.sparsestep <- function(x, ...) { cat("\nCall:\n") - dput(obj$call) - cat("Lambda:", obj$lambda, "\n") - invisible(obj) + dput(x$call) + cat("Lambda:", x$lambda, "\n") + invisible(x) } -- cgit v1.2.3