Skip to content

Commit

Permalink
Minor bug fix in average.spec.se() function
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn P. Serbin committed Feb 18, 2014
1 parent b834871 commit 6490247
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions R/average.spec.se.R
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,16 @@ average.spec.se <- function(file.dir=NULL,out.dir=NULL,spec.type=NULL,spec.file.
#good.spec <- droplevels(in.spec3[which(in.spec3$Wave_450<=bias),])
if (length(good.spec.temp2)>0){
good.spec <- droplevels(in.spec3[good.spec.temp2,])
dims <- dim(good.spec)
check <- length(wht.ref)+dim(good.spec)[1]+dim(bad.spec)[1]==dim(in.spec3)[1]
} else {
good.spec <- droplevels(in.spec3[good.spec.temp,])
#good.spec <- droplevels(in.spec3[good.spec.temp,])
good.spec <- wht.ref.spec
dims <- dim(good.spec)
check <- length(wht.ref)+dim(bad.spec)[1]==dim(in.spec3)[1]
}
dims <- dim(good.spec)
check <- length(wht.ref)+dim(good.spec)[1]+dim(bad.spec)[1]==dim(in.spec3)[1]
#dims <- dim(good.spec)
#check <- length(wht.ref)+dim(good.spec)[1]+dim(bad.spec)[1]==dim(in.spec3)[1]

# temporary debugging flag
if (check==FALSE) {
Expand Down

0 comments on commit 6490247

Please sign in to comment.