Skip to content

Commit

Permalink
Merge pull request #71 from aappling-usgs/master
Browse files Browse the repository at this point in the history
follow-ups to PC meeting
  • Loading branch information
aappling-usgs committed Aug 14, 2015
2 parents ee1b432 + 045f791 commit ec45141
Show file tree
Hide file tree
Showing 15 changed files with 145 additions and 49 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ r_github_packages:
- appling/unitted
- USGS-R/streamMetabolizer
- USGS-R/sbtools
- USGS-R/mda.streams
- USGS-R/gsplot
- USGS-R/geoknife
- USGS-R/mda.streams

after_success:
- Rscript -e 'covr::coveralls()'
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: powstreams
Type: Package
Title: powstreams
Version: 0.7.11
Date: 2015-07-31
Version: 0.7.12
Date: 2015-08-13
Author: Jordan S Read, Luke A Winslow, Alison Appling
Maintainer: Jordan S Read <jread@usgs.gov>
Description: tools for working Powell Center working group on stream metabolism.
Expand Down
6 changes: 6 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ export(get_metab_model)
export(get_site_info)
export(get_ts)
export(get_ts_metadata)
export(list_metab_models)
export(list_metab_run_files)
export(list_metab_runs)
export(list_sites)
export(list_tses)
export(locate_folder)
Expand All @@ -35,6 +38,9 @@ importFrom(mda.streams,get_meta)
importFrom(mda.streams,get_metab_model)
importFrom(mda.streams,get_ts)
importFrom(mda.streams,get_var_src_codes)
importFrom(mda.streams,list_metab_models)
importFrom(mda.streams,list_metab_run_files)
importFrom(mda.streams,list_metab_runs)
importFrom(mda.streams,list_sites)
importFrom(mda.streams,list_tses)
importFrom(mda.streams,locate_folder)
Expand Down
2 changes: 1 addition & 1 deletion R/export_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#' @seealso \code{\link[unitted]{write_unitted}}, \code{\link{write.table}}
#' @export
export_data <- function(data, file="", keep.units=is.unitted(data), comment.char = "#", sep = "\t", row.names = FALSE, quote = FALSE, ...) {
if(is.unitted(data) & isTRUE(with.units)) {
if(is.unitted(data) & isTRUE(keep.units)) {
write_unitted(data, file=file, comment.char=comment.char, sep=sep, row.names=row.names, quote=quote, ...)
} else {
write.table(v(data), file=file, sep=sep, row.names=row.names, quote=quote, ...)
Expand Down
9 changes: 9 additions & 0 deletions R/list_metab_models.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#' List the available metab_model objects
#'
#' @return a character vector of titles of the metab_model .RData files posted on SB
#'
#' @importFrom mda.streams list_metab_models
#' @name list_metab_models
#' @rdname list_metab_models
#' @export
NULL
11 changes: 11 additions & 0 deletions R/list_metab_run_files.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#' List the files stored in a metabolism runs
#'
#' @param title a metab_run title
#' @param out the columns to return
#' @return dataframe of file names and sizes within a metab_run
#'
#' @importFrom mda.streams list_metab_run_files
#' @name list_metab_run_files
#' @rdname list_metab_run_files
#' @export
NULL
9 changes: 9 additions & 0 deletions R/list_metab_runs.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#' List the available metabolism runs
#'
#' @return a character vector of titles of the metab_runs posted on SB
#'
#' @importFrom mda.streams list_metab_runs
#' @name list_metab_runs
#' @rdname list_metab_runs
#' @export
NULL
3 changes: 2 additions & 1 deletion R/locate_metab_model.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
#' @param browser logical. Should the URL be opened in a browser?
#' @examples
#' \dontrun{
#' locate_metab_model("nwis_01473900-16-150730 0.0.7 MLE_for_PRK_wHarvey_and_sw", format="url", browser=FALSE)
#' locate_metab_model("nwis_01473900-16-150730 0.0.7 MLE_for_PRK_wHarvey_and_sw",
#' format="url", browser=FALSE)
#' }
#' @importFrom mda.streams locate_metab_model
#' @name locate_metab_model
Expand Down
54 changes: 31 additions & 23 deletions R/powstreams.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,48 +20,56 @@
#'
#' }
#'
#' @section Logging in:
#' @section Logging into ScienceBase:
#'
#' \itemize{
#'
#' \item \code{\link{login_sb}}
#' \item \code{\link{login_sb}} - log into SB with your myUSGS credentials
#'
#' }
#'
#' @section Querying ScienceBase:
#'
#' \itemize{
#'
#' \item \code{\link{list_sites}}
#' \item \code{\link{list_sites}} - list the sites stored on SB
#'
#' \item \code{\link{list_tses}}
#' \item \code{\link{list_tses}} - list the timeseries data on SB for a site
#'
#' \item \code{\link{summarize_ts}}
#' \item \code{\link{summarize_ts}} - get date ranges, num rows, etc. for a ts
#'
#' \item \code{\link[mda.streams]{list_metab_runs}}
#' \item \code{\link{list_metab_runs}} - list the metabolism modeling runs on
#' SB
#'
#' \item \code{\link[mda.streams]{list_metab_run_files}}
#' \item \code{\link{list_metab_run_files}} - list the raw files from one
#' modeling run
#'
#' \item \code{\link{list_metab_models}} - list the metab_model objects on SB
#'
#' }
#'
#' @section Navigating ScienceBase:
#'
#' \itemize{
#'
#' \item \code{\link{locate_folder}}
#' \item \code{\link{locate_folder}} - find a high-level folder on the SB
#' website
#'
#' \item \code{\link{locate_meta}}
#' \item \code{\link{locate_meta}} - find a site data table on the SB website
#'
#' \item \code{\link{locate_metab_model}}
#' \item \code{\link{locate_metab_model}} - find a metab_model object on the
#' SB website
#'
#' \item \code{\link{locate_metab_run}}
#' \item \code{\link{locate_metab_run}} - find a metabolism modeling run
#' folder on the SB website
#'
#' \item \code{\link{locate_site}}
#' \item \code{\link{locate_site}} - find a site folder on the SB website
#'
#' \item \code{\link{locate_ts}}
#' \item \code{\link{locate_ts}} - find a timeseries data item on the SB
#' website
#'
#' }
#'
#'
#' @section Reading data from ScienceBase:
#'
#' \itemize{
Expand All @@ -81,39 +89,39 @@
#' \item \code{\link{get_ts}} - loads data from SB into R
#'
#' \item \code{\link{get_ts_metadata}} - get info about ts data
#'
#'
#' }
#'
#' @section Exporting data from R to text:
#'
#' \itemize{
#'
#' \item \code{\link{export_data}} - exports data from R into a text file
#' \item \code{\link{export_data}} - export data from R into a text file
#'
#' \item \code{\link{view_file}}
#' \item \code{\link{view_file}} - open a file in your system's default app
#'
#' \item \code{\link{view_folder}}
#' \item \code{\link{view_folder}} - open a folder in your file explorer
#'
#' }
#'
#' @section Reading models from ScienceBase:
#'
#' \itemize{
#'
#' \item \code{\link{get_config}} - gets a config file from SB
#' \item \code{\link{get_config}} - get a config file from SB
#'
#' \item \code{\link{get_metab_model}} - get a metab_model object from SB
#'
#' \item \code{\link{get_metab_model}} - gets a metab_model object from SB
#'
#' }
#'
#' @section Other actions for ScienceBase:
#'
#' \itemize{
#'
#' \item \code{\link{upload_presentation}} - uploads a presentation to the
#' \item \code{\link{upload_presentation}} - upload a presentation to the
#' Presentations folder on SB
#'
#' \item \code{\link{upload_publication}} - uploads a presentation to the
#' \item \code{\link{upload_publication}} - upload a presentation to the
#' Publications folder on SB
#'
#' }
Expand Down
1 change: 1 addition & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ build_script:
- travis-tool.sh install_github appling/unitted
- travis-tool.sh install_github USGS-R/streamMetabolizer
- travis-tool.sh install_github USGS-R/sbtools
- travis-tool.sh install_github USGS-R/gsplot
- travis-tool.sh install_github USGS-R/geoknife
- travis-tool.sh install_github USGS-R/mda.streams
- travis-tool.sh install_deps
Expand Down
12 changes: 12 additions & 0 deletions man/list_metab_models.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/list_metab_models.R
\name{list_metab_models}
\alias{list_metab_models}
\title{List the available metab_model objects}
\value{
a character vector of titles of the metab_model .RData files posted on SB
}
\description{
List the available metab_model objects
}

17 changes: 17 additions & 0 deletions man/list_metab_run_files.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/list_metab_run_files.R
\name{list_metab_run_files}
\alias{list_metab_run_files}
\title{List the files stored in a metabolism runs}
\arguments{
\item{title}{a metab_run title}

\item{out}{the columns to return}
}
\value{
dataframe of file names and sizes within a metab_run
}
\description{
List the files stored in a metabolism runs
}

12 changes: 12 additions & 0 deletions man/list_metab_runs.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/list_metab_runs.R
\name{list_metab_runs}
\alias{list_metab_runs}
\title{List the available metabolism runs}
\value{
a character vector of titles of the metab_runs posted on SB
}
\description{
List the available metabolism runs
}

3 changes: 2 additions & 1 deletion man/locate_metab_model.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Find a metab_model item on ScienceBase
}
\examples{
\dontrun{
locate_metab_model("nwis_01473900-16-150730 0.0.7 MLE_for_PRK_wHarvey_and_sw", format="url", browser=FALSE)
locate_metab_model("nwis_01473900-16-150730 0.0.7 MLE_for_PRK_wHarvey_and_sw",
format="url", browser=FALSE)
}
}

48 changes: 28 additions & 20 deletions man/powstreams.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ lower-level functions generic to all ScienceBase tasks, see \pkg{sbtools}.
}
}

\section{Logging in}{
\section{Logging into ScienceBase}{


\itemize{

\item \code{\link{login_sb}}
\item \code{\link{login_sb}} - log into SB with your myUSGS credentials

}
}
Expand All @@ -43,15 +43,19 @@ lower-level functions generic to all ScienceBase tasks, see \pkg{sbtools}.

\itemize{

\item \code{\link{list_sites}}
\item \code{\link{list_sites}} - list the sites stored on SB

\item \code{\link{list_tses}}
\item \code{\link{list_tses}} - list the timeseries data on SB for a site

\item \code{\link{summarize_ts}}
\item \code{\link{summarize_ts}} - get date ranges, num rows, etc. for a ts

\item \code{\link[mda.streams]{list_metab_runs}}
\item \code{\link{list_metab_runs}} - list the metabolism modeling runs on
SB

\item \code{\link[mda.streams]{list_metab_run_files}}
\item \code{\link{list_metab_run_files}} - list the raw files from one
modeling run

\item \code{\link{list_metab_models}} - list the metab_model objects on SB

}
}
Expand All @@ -61,17 +65,21 @@ lower-level functions generic to all ScienceBase tasks, see \pkg{sbtools}.

\itemize{

\item \code{\link{locate_folder}}
\item \code{\link{locate_folder}} - find a high-level folder on the SB
website

\item \code{\link{locate_meta}}
\item \code{\link{locate_meta}} - find a site data table on the SB website

\item \code{\link{locate_metab_model}}
\item \code{\link{locate_metab_model}} - find a metab_model object on the
SB website

\item \code{\link{locate_metab_run}}
\item \code{\link{locate_metab_run}} - find a metabolism modeling run
folder on the SB website

\item \code{\link{locate_site}}
\item \code{\link{locate_site}} - find a site folder on the SB website

\item \code{\link{locate_ts}}
\item \code{\link{locate_ts}} - find a timeseries data item on the SB
website

}
}
Expand Down Expand Up @@ -105,11 +113,11 @@ lower-level functions generic to all ScienceBase tasks, see \pkg{sbtools}.

\itemize{

\item \code{\link{export_data}} - exports data from R into a text file
\item \code{\link{export_data}} - export data from R into a text file

\item \code{\link{view_file}}
\item \code{\link{view_file}} - open a file in your system's default app
\item \code{\link{view_folder}}
\item \code{\link{view_folder}} - open a folder in your file explorer
}
}
Expand All @@ -119,9 +127,9 @@ lower-level functions generic to all ScienceBase tasks, see \pkg{sbtools}.
\itemize{
\item \code{\link{get_config}} - gets a config file from SB
\item \code{\link{get_config}} - get a config file from SB
\item \code{\link{get_metab_model}} - gets a metab_model object from SB
\item \code{\link{get_metab_model}} - get a metab_model object from SB
}
}
Expand All @@ -131,10 +139,10 @@ lower-level functions generic to all ScienceBase tasks, see \pkg{sbtools}.
\itemize{
\item \code{\link{upload_presentation}} - uploads a presentation to the
\item \code{\link{upload_presentation}} - upload a presentation to the
Presentations folder on SB
\item \code{\link{upload_publication}} - uploads a presentation to the
\item \code{\link{upload_publication}} - upload a presentation to the
Publications folder on SB
}
Expand Down

0 comments on commit ec45141

Please sign in to comment.