summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuraj Yerramilli2016-01-07 16:57:27 +0530
committerSuraj Yerramilli2016-01-07 16:57:27 +0530
commitaa5e9eec82af3d3555dd8e52c2e9ceb5743bf4bd (patch)
treef78629389752e32875ceb1798f03e056dc137800
parente7142228f528599407544f119331a2efe5c9cfc8 (diff)
downloadSysID-R-code-aa5e9eec82af3d3555dd8e52c2e9ceb5743bf4bd.tar.gz
SysID-R-code-aa5e9eec82af3d3555dd8e52c2e9ceb5743bf4bd.tar.bz2
SysID-R-code-aa5e9eec82af3d3555dd8e52c2e9ceb5743bf4bd.zip
minor changes
-rw-r--r--DESCRIPTION2
-rw-r--r--NAMESPACE1
-rw-r--r--R/idframe.R2
-rw-r--r--R/sim.R4
4 files changed, 6 insertions, 3 deletions
diff --git a/DESCRIPTION b/DESCRIPTION
index b88cecb..7a1d3a6 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -11,5 +11,5 @@ Description: The sysid package provides functions for constructing mathematical
paramteric model estimation, and model predictions and validation.
License: GPL-3
Imports:
- signal,tframe,tfplot,zoo, ggplot2
+ signal,tframe,tfplot,zoo, ggplot2, reshape2, polynom
RoxygenNote: 5.0.1
diff --git a/NAMESPACE b/NAMESPACE
index 70e2611..c969994 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -61,6 +61,7 @@ export(sim)
export(spa)
export(step)
import(ggplot2)
+import(polynom)
import(reshape2)
import(tfplot)
import(tframe)
diff --git a/R/idframe.R b/R/idframe.R
index 37df6bf..65ffacc 100644
--- a/R/idframe.R
+++ b/R/idframe.R
@@ -150,7 +150,7 @@ idfrd <- function(response,freq,Ts){
#' frf <- spa(data) # Estimates the frequency response from data
#' plot(frf)
#'
-#' @import ggplot2
+#' @import ggplot2 reshape2
#'
#' @export
plot.idfrd <- function(x){
diff --git a/R/sim.R b/R/sim.R
index 14e7049..834313a 100644
--- a/R/sim.R
+++ b/R/sim.R
@@ -51,6 +51,8 @@ sim.default <- function(model,input,sigma=0,seed=NULL){
#' model <- idpoly(A=c(1,-1.5,0.7),B=c(0.8,-0.25),ioDelay=1)
#' y <- sim(model,u,sigma=0.1)
#'
+#' @import polynom
+#'
#' @export
sim.idpoly <- function(model,input,sigma=0,seed=NULL){
if(model$type=="arx"){
@@ -67,7 +69,7 @@ sim.idpoly <- function(model,input,sigma=0,seed=NULL){
B <- c(rep(0,model$ioDelay),model$B)
den2 <- as.numeric(polynomial(model$A)*polynomial(model$F1))
- filt2 <- Arma(b=B,a=den2)
+ filt2 <- signal::Arma(b=B,a=den2)
ufk <- signal::filter(filt2,input)
yk <- as.numeric(ufk) + as.numeric(vk)