summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
Diffstat (limited to 'R')
-rw-r--r--R/idframe.R16
-rw-r--r--R/nonparam.R5
2 files changed, 11 insertions, 10 deletions
diff --git a/R/idframe.R b/R/idframe.R
index c666b55..e619fca 100644
--- a/R/idframe.R
+++ b/R/idframe.R
@@ -57,6 +57,7 @@ idframe <- function(output,input=NULL,Ts = 1,start=0,end=NULL,
#' @param lwd line width, in millimeters(Default=\code{1})
#' @param main the plot title. (Default = \code{NULL})
#' @param size text size (Default = \code{12})
+#' @param \ldots additional arguments
#'
#' @examples
#' data(cstr)
@@ -65,7 +66,7 @@ idframe <- function(output,input=NULL,Ts = 1,start=0,end=NULL,
#' @import ggplot2 reshape2
#'
#' @export
-plot.idframe <- function(x,col="steelblue",lwd=1,main=NULL,size=12){
+plot.idframe <- function(x,col="steelblue",lwd=1,main=NULL,size=12,...){
loadNamespace("ggplot2")
if(nInputSeries(x)==0){
data <- outputData(x)
@@ -82,12 +83,12 @@ plot.idframe <- function(x,col="steelblue",lwd=1,main=NULL,size=12){
}
#' @export
-summary.idframe <- function(x){
- out_sum <- summary(outputData(x))
- in_sum <- summary(inputData(x))
+summary.idframe <- function(object,...){
+ out_sum <- summary(outputData(object))
+ in_sum <- summary(inputData(object))
- out <- list(out_sum=out_sum,in_sum=in_sum,Ts=deltat(x),
- unit=x$unit,nsample = dim(outputData(x))[1])
+ out <- list(out_sum=out_sum,in_sum=in_sum,Ts=deltat(object),
+ unit=object$unit,nsample = dim(outputData(object))[1])
class(out) <- "summary.idframe"
return(out)
@@ -190,6 +191,7 @@ idfrd <- function(respData,freq,Ts,spec=NULL,covData=NULL,
#' @param col a specification for the line colour (Default : \code{"
#' steelblue"})
#' @param lwd the line width, a positive number, defaulting to 1
+#' @param \ldots additional arguments
#'
#' @seealso \code{\link[ggplot2]{ggplot}}
#'
@@ -200,7 +202,7 @@ idfrd <- function(respData,freq,Ts,spec=NULL,covData=NULL,
#' @import ggplot2 reshape2 signal
#'
#' @export
-plot.idfrd <- function(x,col="steelblue",lwd=1){
+plot.idfrd <- function(x,col="steelblue",lwd=1,...){
loadNamespace("ggplot2")
nfreq <- dim(x$freq)[1]
mag <- 20*log10(Mod(x$resp))
diff --git a/R/nonparam.R b/R/nonparam.R
index 75b26b4..8e8e412 100644
--- a/R/nonparam.R
+++ b/R/nonparam.R
@@ -27,7 +27,7 @@
#' yk <- filter (uk,c(0.9,-0.4),method="recursive") + rnorm(1000,1)
#' data <- idframe(output=data.frame(yk),input=data.frame(uk))
#' fit <- impulseest(data)
-#' plot(fit)
+#' impulseplot(fit)
#'
#' @export
impulseest <- function(x,M=30,K=NULL,regul=F,lambda=1){
@@ -90,8 +90,7 @@ impulsechannel <- function(y,u,N,M,K=0,regul=F,lambda=1){
#' @import ggplot2
#'
#' @export
-plot.impulseest <- function(model,sd=2){
- loadNamespace("ggplot2")
+impulseplot <- function(model,sd=2){
plotseq <- seq(model$noutputs*model$ninputs)
g <- vector("list",model$nin*model$nout)