cv2df() now includes cycles as well as segments in the returned df.

master
Taha Ahmed 14 years ago
parent b5d305bc73
commit 4131c28dcc

@ -349,12 +349,12 @@ cv2df <- function(cvfilename) {
for (s in 1:length(starts)) { for (s in 1:length(starts)) {
zz <- textConnection(chifile[starts[s]:ends[s]], "r") zz <- textConnection(chifile[starts[s]:ends[s]], "r")
ff <- rbind(ff, ff <- rbind(ff,
data.frame(segment = factor(s), data.frame(segment = factor(s), cycle = ceiling(factor(s)/2),
matrix(scan(zz, what = numeric(), sep = ","), matrix(scan(zz, what = numeric(), sep = ","),
ncol = 3, byrow = T))) ncol = 3, byrow = T)))
close(zz) close(zz)
} }
names(ff) <- c("segment", "potential", "current", "charge") names(ff) <- c("segment", "cycle", "potential", "current", "charge")
# #
### Collect attributes of this experiment ### Collect attributes of this experiment
# These attributes are specific for each kind of experiment, # These attributes are specific for each kind of experiment,

Loading…
Cancel
Save