Skip to content

Commit 76235ba

Browse files
committed
Remove chamber 0 data
1 parent a28bcee commit 76235ba

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

R/parse-others.R

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ parse_d20190830_LIANG <- function(path) {
2222

2323
for(f in seq_along(co2files)) {
2424
fn <- files[co2files][f]
25-
message(f, "/", length(co2files), " ", fn)
26-
# cat(f, "/", length(co2files), " ", fn, "\n", file = "~/Desktop/log.txt", append = T)
25+
# message(f, "/", length(co2files), " ", fn)
26+
# cat(f, "/", length(co2files), " ", fn, "\n", file = "~/Desktop/log.txt", append = T)
2727

2828
# Find and parse the header; its location varies by file
2929
top <- readLines(fn, n = 50)
@@ -42,6 +42,7 @@ parse_d20190830_LIANG <- function(path) {
4242

4343
dat$TS <- as.POSIXct(dat$TIMESTAMP, format = "%Y-%m-%d %H:%M:%S")
4444
dat <- dat[!is.na(dat$CO2) & !is.na(dat$TS),]
45+
dat <- dat[dat$Chamber > 0,]
4546

4647
# Find new-chamber rows
4748
newchamber <- which(head(dat$Chamber, -1) != tail(dat$Chamber, -1)) + 1

0 commit comments

Comments
 (0)