Skip to content

Commit

Permalink
Quickfix for #52
Browse files Browse the repository at this point in the history
plotprofmle was issuing an error when the entire profile was
lower than "ratio", i.e., no blue line was to be drawn. Fixed adding
an "if" to check for that condition
  • Loading branch information
andrechalom committed May 28, 2015
1 parent b04f614 commit abcd602
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions R/plotprofmle.R
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ plotprofmle <- function(profobj, nseg=20, ratio=log(8), which=1:length(profobj@p
change <- (interpol$y - ratio)[2:l] * (interpol$y - ratio)[1:(l-1)]
endpoints <- which(change < 0)
corr <- (interpol$x[2]-interpol$x[1])/2
if(length(endpoints) > 0)
for (j in 1:(length(endpoints)/2)) {
lower <-interpol$x[endpoints[(2*j)-1]]+corr
upper <- interpol$x[endpoints[2*j]]+corr
Expand Down

0 comments on commit abcd602

Please sign in to comment.