I have a similar problem .
Here are functions I know that work properly
## PAnnuity function definition
PAnnuity - function(A,y,m,n)
{
f-(A/(y/m))*(1-1/((1+y/m)^n))
}
##BondPrice function
BondPrice - function(c,y,m,n)
{
B -100
f-PAnnuity((c/m)*B,y,m,n) + B /((1+y/m)^n)
}
My function of
* (2 * t) - 6 * 2
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org
]
On Behalf Of Marlin Keith Cox
Sent: Friday, January 22, 2010 4:37 PM
To: r-help@r-project.org
Subject: [R] first and second derivative calculation
I would like to calculate
I would like to calculate a first and second derivative and am having
problems finding a simple solution. My syntax may be off as I am not a
mathematician, so pardon ahead of time.
data:
t-seq(0,4, by=.1)
The function is:
H(t) = t^3-6*t^2+5*t + 30
from here I plot the curve:
plot(x,y
4:37 PM
To: r-help@r-project.org
Subject: [R] first and second derivative calculation
I would like to calculate a first and second derivative and am having
problems finding a simple solution. My syntax may be off as I am not a
mathematician, so pardon ahead of time.
data:
t-seq(0,4, by=.1
]
On Behalf Of Marlin Keith Cox
Sent: Friday, January 22, 2010 4:37 PM
To: r-help@r-project.org
Subject: [R] first and second derivative calculation
I would like to calculate a first and second derivative and am having
problems finding a simple solution. My syntax may be off as I am
[mailto:r-help-boun...@r-project.org
]
On Behalf Of Marlin Keith Cox
Sent: Friday, January 22, 2010 4:37 PM
To: r-help@r-project.org
Subject: [R] first and second derivative calculation
I would like to calculate a first and second derivative and am having
problems finding a simple solution. My syntax
6 matches
Mail list logo