Re: [R] problem applying .C function in outer product

About this list Date view Thread view Subject view Author view Attachment view

From: Allin Cottrell (cottrell@wfu.edu)
Date: Thu 13 Mar 2003 - 10:30:42 EST


Message-id: <Pine.LNX.4.52.0303121826520.14500@ricardo.ecn.wfu.edu>

On Wed, 12 Mar 2003, Jim McLoughlin wrote:

> /*
> * Wrapper for use in R - requires that return value by passed via
> argument
> */
> void blackScholesR( double *S, double *K, double *r, double *T, double
> *volatility, double *price)
> {
> *price = blackScholes(*S, *K, *r, *T, *volatility);
> }

You are passing all scalars and no vectors to the function
blackScholes(). E.g. if S is of type (double *), then *S is of type
double (a single double-precision value, S[0]), and so on for *K, *r,
*T etc.

Allin Cottrell.

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:25 EST