[R] Getting rate of return
Salvatore Barbaro
sbarbar at gwdg.de
Wed Apr 30 08:50:47 CEST 2003
# Hi,
# define as r the revenue and as c the cost
# for example:
r<- 60
c<- 50
# function to obtain the rate of return:
ror<- function(r,c){
foo<- r/c-1
return(foo)
}
# the command ror(r,c) gives you the required rate of return
ror(r,c)
best regards
s.
On 30 Apr 2003 at 5:26, Progressive Economist wrote:
Dear R help.
I have a beginner's question to ask you. I faced a difficulty in
getting rate of return for some target data. I finished data importing
and some manipulations. but I have any idea after that. Anyone
who
answer this question?
Thanks in advance
Park H.J
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
salvatore barbaro
department of public economics
platz der göttinger sieben 3
37073 göttingen
tel.: +49 551 3919704
fax: +49 551 39 7353
http://www.gwdg.de/~sbarbar
More information about the R-help
mailing list