From fa6ac99fa5bcf0ba27aeebb85f64d870326b6161 Mon Sep 17 00:00:00 2001 From: Taha Ahmed Date: Fri, 18 Mar 2011 21:54:49 +0100 Subject: [PATCH] Changed attribute name Segment to Segments (stores no of segments). Because we already have the counter "segment", which stores the current segment (so for Segments = 10, segment = 1:10). --- CHI.R | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHI.R b/CHI.R index 9fe3e6e..dae9ced 100644 --- a/CHI.R +++ b/CHI.R @@ -401,9 +401,9 @@ cv2df <- function(datafilename, wearea = 1) { ScanRate <- as.numeric(strsplit(chifile[which(position.ScanRate == 1)], "\\s=\\s")[[1]][2]) ff$ScanRate <- ScanRate # Segments, number of - position.Segment <- regexpr("^Segment\\s=", chifile) - Segment <- as.numeric(strsplit(chifile[which(position.Segment == 1)], "\\s=\\s")[[1]][2]) - ff$Segment <- Segment + position.Segments <- regexpr("^Segment\\s=", chifile) + Segments <- as.numeric(strsplit(chifile[which(position.Segments == 1)], "\\s=\\s")[[1]][2]) + ff$Segments <- Segments # SampleInterval (volt) position.SampleInterval <- regexpr("^Sample\\sInterval\\s\\(V\\)", chifile) SampleInterval <- as.numeric(strsplit(chifile[which(position.SampleInterval == 1)], "\\s=\\s")[[1]][2])