Permalink
Browse files

fixed description file and error in calculating price response

  • Loading branch information...
1 parent e45b223 commit 0a0c65a9229c824cb4b9ca7a7c425c7556f39d38 @jdanielnd committed May 6, 2012
Showing with 3 additions and 4 deletions.
  1. +0 −3 DESCRIPTION
  2. +3 −1 R/add.price.R
View
@@ -4,9 +4,6 @@ Title: Time series generator
Version: 1.0
Date: 2012-05-05
Author: Joao Daniel, Claudio Duarte
-Authors@R: c(person("Joao", "Duarte", role = c("aut", "cre"), email
- = "jdanielnd@gmail.com"), person("Claudio", "Duarte",
- role = c("aut","cre")))
Maintainer: Joao Daniel <jdanielnd@gmail.com>
Description: Provide tools to generate time series
License: MIT
View
@@ -24,7 +24,9 @@ add.price <- function(tser, elast, random.price=FALSE, inf.limit=NULL, sup.limit
## Gerando Resposta ao Preco
rp <- vector("numeric",length(price))
rp[1] <- 0
- rp[-1] <- ((price[-length(price)] - price[-1])/price[-length(price)])*elast
+ rp[-1] <- (price[-1] - price[-length(price)])/price[-length(price)]
+
+ rp <- rp*elast
## Gerando Volume Basico c/ Sazonalidade e Resposta ao Preco
vbsazrp <- tser*(rp + 1)

0 comments on commit 0a0c65a

Please sign in to comment.