-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9c23ddb
commit 37edc35
Showing
86 changed files
with
4,750 additions
and
238 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,22 +1,26 @@ | ||
Package: rloadest | ||
Type: Package | ||
Title: River Load Estimation | ||
Version: 0.4.0 | ||
Date: 2015-02-27 | ||
Version: 0.4.2 | ||
Date: 2015-07-20 | ||
Author: Dave Lorenz, Rob Runkel, Laura De Cicco | ||
Maintainer: Dave Lorenz <[email protected]> | ||
Description: Collection of functions to make constituent load estimations | ||
based on the LOADEST program. | ||
License: CC0 | ||
Depends: | ||
R (>= 3.0.0), | ||
smwrBase, | ||
smwrGraphs, | ||
smwrStats, | ||
smwrQW | ||
Imports: | ||
stats | ||
lubridate, | ||
stats, | ||
segmented | ||
Suggests: | ||
smwrBase, | ||
dataRetrieval | ||
dataRetrieval, | ||
EGRET, | ||
survival | ||
LazyLoad: yes | ||
LazyData: yes |
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,19 @@ | ||
#' Models | ||
|
||
#' A dataset that describes the equivalent formula for each of the | ||
#'predefined model number. | ||
#' @name Models | ||
#' @docType data | ||
#' @usage Models | ||
#' @format Data frame with 9 rows and 2 columns\cr | ||
#'\tabular{lll}{ | ||
#'Name \tab Type \tab Description\cr | ||
#'Number \tab integer \tab The predefined model number\cr | ||
#'Formula \tab factor \tab The equivalent formula for the predefined model number\cr | ||
#'} | ||
#' @keywords datasets | ||
#' @seealso \code{\link{model}} | ||
#' @examples | ||
#' data(Models) | ||
#' print(Models) | ||
NULL |
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,32 @@ | ||
#' Describe Censoring | ||
#' | ||
#' Gets the type of censoring ("none," "left," "multiple") for an object. | ||
#' | ||
#' | ||
#' @param x the object to get the type of censoring. For an object of class | ||
#'"Surv," the type must be "interval." | ||
#' @return A character string "none," "left," or "multiple" describing the type | ||
#'of censoring present in the object. | ||
#' @note This function is mostly used within other functions to determine the | ||
#''best' technique to use for analysis. | ||
#' @keywords censored attribute | ||
#' @examples | ||
#'\dontrun{ | ||
#'library(survival) | ||
#'censoring(Surv(2.3, 2.3, type="interval2")) | ||
#'} | ||
#' @export | ||
#' @method censoring Surv | ||
censoring.Surv <- function(x) { | ||
if(attr(x, "type") != "interval") | ||
stop("Only interval type censoring supported") | ||
# Strip NAs from x | ||
x <- x[!is.na(x)] | ||
if(all(x[, 3] == 1)) { | ||
return("none") | ||
} else if(any(x[, 3] %in% c(0,3))) { | ||
return("multiple") | ||
} | ||
return("left") | ||
} | ||
|
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
Oops, something went wrong.