[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
# the command ror(r,c) gives you the required rate of return

best regards


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 
answer this question?

Thanks in advance

Park H.J

R-help at stat.math.ethz.ch mailing list
salvatore barbaro
department of public economics
platz der göttinger sieben 3
37073 göttingen
tel.: +49 551 3919704
fax:  +49 551 39 7353

More information about the R-help mailing list