Skip to content

Commit

Permalink
Merge pull request #31 from lawinslow/master
Browse files Browse the repository at this point in the history
fix zmax issues
  • Loading branch information
Luke Winslow authored Jul 15, 2016
2 parents 5e2aa9f + 95da83f commit 5a3d5c7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: lakeattributes
Type: Package
Title: A collection of lake attribute data
Version: 0.8.6
Version: 0.8.7
Date: 2015-05-18
Author: Luke Winslow
Maintainer: Luke Winslow <[email protected]>
Expand Down
10 changes: 9 additions & 1 deletion R/get_zmax.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,18 @@
get_zmax = function(id){
site_id = as.character(id)

bathy = get_bathy(id, cone_est=FALSE)
#quick short circuit. If we have a bathy file,
#return max depth from that.

if(!is.null(bathy)){
return(max(bathy$depths, na.rm=TRUE))
}

lake_zmax = subset(zmax, site_id == id)
if(nrow(lake_zmax) < 1){

return(max(get_bathy(site_id, cone_est=FALSE)$depth))
return(max(get_bathy(site_id, cone_est=FALSE)$depths))

}else{
if(nrow(lake_zmax) > 1){
Expand Down
2 changes: 2 additions & 0 deletions R/wtemp.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#'
#' @docType data
#'
#'
#'
#' @examples
#' data(wtemp)
#' head(wtemp)
Expand Down

0 comments on commit 5a3d5c7

Please sign in to comment.