-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added import_remote function, tweak to ecometab function to format al…
…l columns as numeric
- Loading branch information
Showing
7 changed files
with
111 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Package: SWMPr | ||
Type: Package | ||
Title: SWMPr package for estuarine monitoring data | ||
Version: 1.8.1 | ||
Date: 2015-3-20 | ||
Version: 1.9.0 | ||
Date: 2015-3-23 | ||
Author: Marcus Beck | ||
Maintainer: Marcus Beck <[email protected]> | ||
Description: This packages provides functions for retrieving, organizing, and | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
% Generated by roxygen2 (4.1.0): do not edit by hand | ||
% Please edit documentation in R/swmpr_retrieval.R | ||
\name{import_remote} | ||
\alias{import_remote} | ||
\title{Import SWMP data from Amazon web services} | ||
\usage{ | ||
import_remote(station_code) | ||
} | ||
\arguments{ | ||
\item{station_code}{chr string of station to import, i.e., 7 or 8 characters indicating the reserve, site, and data type. Do not include years.} | ||
} | ||
\value{ | ||
Returns a swmpr object. | ||
} | ||
\description{ | ||
Import SWMP data that are stored on Amazon web services as .RData files. Data include almost all available data from 1994 to 2014 for every SWMP station. | ||
} | ||
\details{ | ||
This function allows quick retrieval of .RData files for all data at a single SwMP site. It differs from the other data retrieval functions in that the raw data are downloaded from an independent remote server. Retrieval time is much faster because the files are in binary format for quick import. However, the data are only available up to December 2014 and may not be regularly updated. Always use the CDMO for current data. The data have also been pre-processed using the \code{\link{qaqc}} and setstep functions. | ||
|
||
The files are available here: \url{https://s3.amazonaws.com/swmpalldata/}. Files can be obtained using the function or by copying the URL to a web browser with the station name appended to the address, including the .RData file extenssion. For example, \url{https://s3.amazonaws.com/swmpalldata/acebbnut.RData}. | ||
} | ||
\examples{ | ||
## see the available files on the server | ||
library(XML) | ||
library(httr) | ||
files_s3 <- GET('https://s3.amazonaws.com/swmpalldata/')$content | ||
files_s3 <- rawToChar(files_s3) | ||
files_s3 <- htmlTreeParse(files_s3, useInternalNodes = T) | ||
files_s3 <- xpathSApply(files_s3, '//contents//key', xmlValue) | ||
|
||
## import a file | ||
dat <- import_remote('acebbnut') | ||
|
||
head(dat) | ||
|
||
attributes(dat) | ||
} | ||
\seealso{ | ||
\code{\link{import_local}} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters