summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-03-22 20:37:02 +0530
committerSuraj Yerramilli2015-03-22 20:37:02 +0530
commita93a9661626862afd941996a1d5f27f3cc0138bf (patch)
tree5f6b21a509b17e92b0e8d2089687f8c9039c71cc /R
parent6f034a37fc7b35f94b9eaa1738bec4f5b2e2561b (diff)
downloadSysID-R-code-a93a9661626862afd941996a1d5f27f3cc0138bf.tar.gz
SysID-R-code-a93a9661626862afd941996a1d5f27f3cc0138bf.tar.bz2
SysID-R-code-a93a9661626862afd941996a1d5f27f3cc0138bf.zip
Added documentation for the demean function
Diffstat (limited to 'R')
-rw-r--r--R/demean.R14
-rw-r--r--R/detrend.R2
2 files changed, 8 insertions, 8 deletions
diff --git a/R/demean.R b/R/demean.R
index 9f1f436..3a5a9ab 100644
--- a/R/demean.R
+++ b/R/demean.R
@@ -15,8 +15,8 @@
#'
#' @examples
#' data(cstr)
-#' fit <- detrend.idframe(cstr)
-#' cstr_detrend <- predict(fit)
+#' fit.mean <- demean(cstr)
+#' cstr_detrend <- predict(fit.mean)
#'
#' @seealso \code{\link{predict.demean}}, \code{\link[stats]{colMeans}}
#' @export
@@ -42,8 +42,8 @@ demean <- function(data){
#' Center an \code{idframe} object based on the training center means
#'
#' @param object an object of class \code{idframe}
-#' @param newdata An optional idframe object in whic to look for variables with which
-#' to predict. If ommited, the original detrended idframe object is used
+#' @param newdata An optional idframe object in which to look for variables with which
+#' to predict. If ommited, the original idframe object is used
#'
#' @return an \code{idframe} object
#'
@@ -53,9 +53,9 @@ demean <- function(data){
#' splitList <- dataPartition(cstr,p=0.6)
#' train <- splitList$estimation # training set
#' test <- splitList$validation # testing set
-#' fit <- detrend.idframe(train)
-#' train_detrend <- predict(fit)
-#' test_detrend <- predict(fit,newdata=test)
+#' fit.mean <- demean(train)
+#' train_demean <- predict(fit.mean)
+#' test_demean <- predict(fit,newdata=test)
#' @export
predict.demean <- function(object,newdata=NULL,...){
diff --git a/R/detrend.R b/R/detrend.R
index 5c646a2..987c559 100644
--- a/R/detrend.R
+++ b/R/detrend.R
@@ -52,7 +52,7 @@ detrend.idframe <- function(data){
#' Detrended \code{idframe} object based on linear trend fit
#'
#' @param object an object of class \code{idframe}
-#' @param newdata An optional idframe object in whic to look for variables with which
+#' @param newdata An optional idframe object in which to look for variables with which
#' to predict. If ommited, the original detrended idframe object is used
#'
#' @return an \code{idframe} object