Skip to content

Commit

Permalink
Merge pull request #181 from lawinslow/master
Browse files Browse the repository at this point in the history
Standardize hypsometry data.frame headers
  • Loading branch information
Luke Winslow committed Sep 28, 2015
2 parents 402464f + 8b39e82 commit 857f53c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: glmtools
Type: Package
Title: glmtools
Version: 0.10.1
Version: 0.10.2
Date: 2013-09-18
Authors@R: c( person("Jordan", "Read", role = c("aut","cre"),
email = "jread@usgs.gov"),
Expand Down
4 changes: 2 additions & 2 deletions R/compare_to_field.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ compare_to_field <- function(nc_file, field_file, nml_file, metric, as_value = F
bthD <- NA
} else {
hypso <- get_hypsography(file = nml_file)
bthA <- hypso$Areas
bthD <- hypso$Depths
bthA <- hypso$areas
bthD <- hypso$depths
}
compare_data <- resample_to_field(nc_file, field_file, ...)

Expand Down
4 changes: 2 additions & 2 deletions R/get_hypsography.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#'
#'@param glm_nml a nml (a list) for GLM config
#'@param file a string with the path to the GLM glm.nml file
#'@return glm_bth a data.frame with \code{Depths} and \code{Areas}
#'@return glm_bth a data.frame with \code{depths} and \code{areas}
#'@keywords methods
#'@author
#'Jordan S. Read
Expand All @@ -32,6 +32,6 @@ get_hypsography <- function(glm_nml, file){
bthA <- rev(get_nml_value(glm_nml,'A')) # (As of GLMv2.0, nml has areas in m^2, no conversion needed)
bthZ <- rev(max_elev-heights)
glm_bth <- data.frame(bthZ,bthA)
names(glm_bth) <- c("Depths","Areas")
names(glm_bth) <- c("depths","areas")
return(glm_bth)
}
2 changes: 1 addition & 1 deletion man/get_hypsography.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ get_hypsography(glm_nml, file)
\item{file}{a string with the path to the GLM glm.nml file}
}
\value{
glm_bth a data.frame with \code{Depths} and \code{Areas}
glm_bth a data.frame with \code{depths} and \code{areas}
}
\description{
Retrieves hypsography information from glm_nml object or file. \cr
Expand Down

0 comments on commit 857f53c

Please sign in to comment.