Skip to content

Commit

Permalink
add print
Browse files Browse the repository at this point in the history
  • Loading branch information
ibarraespinosa committed May 28, 2023
1 parent c6d4393 commit f0911c3
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 33 deletions.
10 changes: 6 additions & 4 deletions R/ef_fun.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
#' @param x0 Numeric; the x-value of the sigmoid's midpoint,
#' @param k Numeric; the steepness of the curve.
#' @param L Integer; the curve's maximum value.
#' @return dataframe of age distrubution of vehicles at each street.
#' @param verbose Logical; to show the equation.
#' @return numeric vector.
#' @export
#' @references https://en.wikipedia.org/wiki/Logistic_function
#' @examples \dontrun{
#' data(fe2015)
#' CO <- ef_cetesb(p = "CO", veh = "PC_G")
#' ef_logit <- ef_fun(ef = CO, x0 = 27, k = 0.4, L = 33)
#' ef_logit <- ef_fun(ef = CO, x0 = 27, k = 0.4, L = max(CO))
#' df <- data.frame(CO, ef_logit)
#' colplot(df)
#' }
Expand All @@ -23,11 +23,13 @@ ef_fun <- function(ef,
x = 1:length(ef),
x0 = mean(ef),
k = 1/4,
L = max(ef)) {
L = max(ef),
verbose = TRUE) {
if(type == "logistic"){
FD <- function(x, x0, L, k) {
L/(1 + exp(1)^(-k*(x - x0)) )
}
print(FD)
a <- vein::EmissionFactors(FD(x, x0 = x0, k = k, L = L))
return(a)
}
Expand Down
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ pkgdown: 2.0.7
pkgdown_sha: ~
articles:
basics: basics.html
last_built: 2023-05-23T04:41Z
last_built: 2023-05-28T20:53Z
urls:
reference: http://atmoschem.github.io/vein/reference
article: http://atmoschem.github.io/vein/articles
Expand Down
Binary file modified docs/reference/celsius-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 20 additions & 20 deletions docs/reference/celsius.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 8 additions & 4 deletions docs/reference/ef_fun.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions man/ef_fun.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f0911c3

Please sign in to comment.