summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-05-21 19:03:55 +0530
committerSuraj Yerramilli2016-05-21 19:03:55 +0530
commit0b25aed6c241ec05c0501165c9a4fc53772e4012 (patch)
treef7f5d006f728883a68a39180757be460b20f503c /R
parentae04e46e0ba498fc9e64debc892a0beeec19b275 (diff)
downloadSysID-R-code-0b25aed6c241ec05c0501165c9a4fc53772e4012.tar.gz
SysID-R-code-0b25aed6c241ec05c0501165c9a4fc53772e4012.tar.bz2
SysID-R-code-0b25aed6c241ec05c0501165c9a4fc53772e4012.zip
loading ggplot2 namespace
Diffstat (limited to 'R')
-rw-r--r--R/estpoly.R2
-rw-r--r--R/idframe.R2
-rw-r--r--R/nonparam.R1
-rw-r--r--R/predict.R1
4 files changed, 5 insertions, 1 deletions
diff --git a/R/estpoly.R b/R/estpoly.R
index 46b2ff7..f18646f 100644
--- a/R/estpoly.R
+++ b/R/estpoly.R
@@ -95,7 +95,7 @@ print.summary.estpoly <- function(x,digits=4){
#' @export
plot.estpoly <- function(model,newdata=NULL){
- require(ggplot2)
+ loadNamespace("ggplot2")
if(is.null(newdata)){
ypred <- ts(fitted(model),names="Predicted")
diff --git a/R/idframe.R b/R/idframe.R
index f38b94e..c0fc2bf 100644
--- a/R/idframe.R
+++ b/R/idframe.R
@@ -66,6 +66,7 @@ idframe <- function(output,input=NULL,Ts = 1,start=0,end=NULL,
#'
#' @export
plot.idframe <- function(x,col="steelblue",lwd=1,main=NULL,size=12){
+ loadNamespace("ggplot2")
if(nInputSeries(x)==0){
data <- outputData(x)
} else{
@@ -191,6 +192,7 @@ idfrd <- function(respData,freq,Ts,spec=NULL,covData=NULL,
#'
#' @export
plot.idfrd <- function(x,col="steelblue",lwd=1){
+ loadNamespace("ggplot2")
nfreq <- dim(x$freq)[1]
mag <- 20*log10(Mod(x$resp))
nout <- dim(mag)[1]; nin <- dim(mag)[2]
diff --git a/R/nonparam.R b/R/nonparam.R
index 9897a04..db5b004 100644
--- a/R/nonparam.R
+++ b/R/nonparam.R
@@ -91,6 +91,7 @@ impulsechannel <- function(y,u,N,M,K=0,regul=F,lambda=1){
#'
#' @export
plot.impulseest <- function(model,sd=2){
+ loadNamespace("ggplot2")
plotseq <- seq(model$noutputs*model$ninputs)
g <- vector("list",model$nin*model$nout)
diff --git a/R/predict.R b/R/predict.R
index 67ed8d0..01a5fc9 100644
--- a/R/predict.R
+++ b/R/predict.R
@@ -98,6 +98,7 @@ predict.estpoly <- function(x,newdata=NULL,nahead=1){
#' @import ggplot2 reshape2
#' @export
compare <- function(data,nahead=1,...){
+ loadNamespace("ggplot2")
# Input Validation
input_list <- as.list(substitute(list(...)))[-1]
dots <- list(...)