Skip to content

Commit

Permalink
add built roxygen2
Browse files Browse the repository at this point in the history
  • Loading branch information
nick_artin committed Sep 22, 2015
1 parent c6b9680 commit 5e3ac3c
Show file tree
Hide file tree
Showing 8 changed files with 142 additions and 0 deletions.
18 changes: 18 additions & 0 deletions linregpackage/man/as.data.frame.linreg.Rd
@@ -0,0 +1,18 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{as.data.frame.linreg}
\alias{as.data.frame.linreg}
\title{A function that creates a data frame from an object of class linreg.}
\usage{
\method{as.data.frame}{linreg}(x, ...)
}
\arguments{
\item{x}{linreg object}
}
\value{
data.frame contains fitted values and residuals.
}
\description{
A function that creates a data frame from an object of class linreg.
}

18 changes: 18 additions & 0 deletions linregpackage/man/coef.linreg.Rd
@@ -0,0 +1,18 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{coef.linreg}
\alias{coef.linreg}
\title{A method that returns the coefficients as a named vector.}
\usage{
\method{coef}{linreg}(object, ...)
}
\arguments{
\item{x}{linreg object}
}
\value{
named vector of coefficients.
}
\description{
A method that returns the coefficients as a named vector.
}

15 changes: 15 additions & 0 deletions linregpackage/man/plot.linreg.Rd
@@ -0,0 +1,15 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{plot.linreg}
\alias{plot.linreg}
\title{The plot-method that creates two plots.}
\usage{
\method{plot}{linreg}(x, ...)
}
\arguments{
\item{x}{linreg object}
}
\description{
The plot-method that creates two plots.
}

18 changes: 18 additions & 0 deletions linregpackage/man/predict.linreg.Rd
@@ -0,0 +1,18 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{predict.linreg}
\alias{predict.linreg}
\title{A method that returns the predicted values y.}
\usage{
\method{predict}{linreg}(object, ...)
}
\arguments{
\item{x}{linreg object}
}
\value{
vector of predictions.
}
\description{
A method that returns the predicted values y.
}

15 changes: 15 additions & 0 deletions linregpackage/man/print.linreg.Rd
@@ -0,0 +1,15 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{print.linreg}
\alias{print.linreg}
\title{Method for printing the coefficients and coefficient names.}
\usage{
\method{print}{linreg}(x, ...)
}
\arguments{
\item{x}{linreg object}
}
\description{
Method for printing the coefficients and coefficient names.
}

18 changes: 18 additions & 0 deletions linregpackage/man/residuals.linreg.Rd
@@ -0,0 +1,18 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{residuals.linreg}
\alias{residuals.linreg}
\title{A method that returns the vector of residuals e.}
\usage{
\method{residuals}{linreg}(object, ...)
}
\arguments{
\item{x}{linreg object}
}
\value{
vector of residuals.
}
\description{
A method that returns the vector of residuals e.
}

18 changes: 18 additions & 0 deletions linregpackage/man/summary.linreg.Rd
@@ -0,0 +1,18 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/methods.R
\name{summary.linreg}
\alias{summary.linreg}
\title{A method that prints a summary of the linreg-function.}
\usage{
\method{summary}{linreg}(object, ...)
}
\arguments{
\item{x}{linreg object}
}
\value{
linreg_summary object, can be printed.
}
\description{
A method that prints a summary of the linreg-function.
}

22 changes: 22 additions & 0 deletions linregpackage/vignettes/linreg_iris.R
@@ -0,0 +1,22 @@
## ------------------------------------------------------------------------
library(linregpackage)
library(ggplot2)

data(iris)
attach(iris)
head(iris, 5)

## ------------------------------------------------------------------------
formula = Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width
m = linreg(formula, iris)
summary(m)

## ----fig.width = 6, fig.height = 3, fig.align='center'-------------------
plot(m)

## ------------------------------------------------------------------------
summary(residuals(m))

## ------------------------------------------------------------------------
summary(predict(m))

0 comments on commit 5e3ac3c

Please sign in to comment.