summaryrefslogtreecommitdiff
path: root/R
diff options
context:
space:
mode:
authorSuraj Yerramilli2015-08-18 18:42:12 +0530
committerSuraj Yerramilli2015-08-18 18:42:12 +0530
commit5c15616e38b20229ec615227fbe815e4910fef11 (patch)
tree9df6e28e90805aaa44785ec1cae58fed0621c20d /R
parentade9ba68d76f9909eaad24e4ea4cca96a3d1be8c (diff)
downloadSysID-R-code-5c15616e38b20229ec615227fbe815e4910fef11.tar.gz
SysID-R-code-5c15616e38b20229ec615227fbe815e4910fef11.tar.bz2
SysID-R-code-5c15616e38b20229ec615227fbe815e4910fef11.zip
Simplifying the summary function
Diffstat (limited to 'R')
-rw-r--r--R/idframe.R24
1 files changed, 6 insertions, 18 deletions
diff --git a/R/idframe.R b/R/idframe.R
index 70a275b..15b3638 100644
--- a/R/idframe.R
+++ b/R/idframe.R
@@ -77,13 +77,8 @@ summary.idframe <- function(object){
out_sum <- summary(object$output)
in_sum <- summary(object$input)
- out <- list(outputs=out_sum,inputs=in_sum,Ts=object$Ts,type=object$type,
- tUnit=object$tUnit,no_of_samples = dim(object$output)[1])
- if(object$type=="time"){
- out$t.start <- object$t.start;out$t.end <- object$t.end
- } else{
- out$frequencies <- summary(object$frequencies);out$fUnit <- object$fUnit
- }
+ out <- list(out_sum=out_sum,in_sum=in_sum,Ts=object$Ts,
+ unit=object$unit,nsample = dim(object$output)[1])
class(out) <- "summary.idframe"
return(out)
@@ -91,24 +86,17 @@ summary.idframe <- function(object){
#' @export
print.summary.idframe <- function(object,...){
- cat("Domain: ");cat(object$type)
- cat("\t\t Number of samples:");cat(object$no_of_samples)
+ cat("\t\t Number of samples:");cat(object$nsample)
cat("\nSampling time: ")
- cat(object$Ts);cat(" ");cat(object$tUnit)
-
- if(object$type=="frequency"){
- cat("\t Frequency Unit: ");print(object$fUnit)
- cat("\n\n Frequeny Summary:")
- print(object$frequencies)
- }
+ cat(object$Ts);cat(" ");cat(object$unit)
cat("\n\n")
cat("Outputs \n")
- print(object$outputs)
+ print(object$out_sum)
cat("\n")
cat("Inputs \n")
- print(object$inputs)
+ print(object$in_sum)
}
#' S3 class for storing frequency response data