[R] 3D Black-Scholes Graph Help!

David Winsemius dwinsemius at comcast.net
Tue Mar 13 22:34:05 CET 2012


On Mar 13, 2012, at 4:49 PM, Berend Hasselman wrote:

>
> On 13-03-2012, at 21:40, David Winsemius wrote:
>
>>
>> On Mar 13, 2012, at 4:24 PM, Anna Dunietz wrote:
>>
>>> Hello all!
>>>
>>> I would like to create a 3d plot, with the option price explained  
>>> by the underlying price and time.  Unfortunately, I can't quite  
>>> get it to work.  I would very much appreciate your help!
>>>
>>
>> The usual problem with lattice calls that you "can't quite get ...  
>> to work" is failure to read the R-FAQ ( or the help(lattice) page)  
>> where it is explained that you need to print() the function result.  
>> At the moment my R-machine is tied up with a long process but try  
>> wrapping print() around that wireframe call.
>>
> There is an error message in the actual plot.
>
> Error using packet 1.
> NAs not allowed in subscripted assignments.

When I got around to running it I was hampered by a lack of knowledge  
about what sort of data-object "price" might have been. I tried  
putting in a single number on hte theory that it would saitisfy the  
seq() call, and also  got the error you report. More input is needed  
from the OP about the problem specification, and hopefully she will  
provide a test dataset.

-- 
David.


>
> Berend
>

David Winsemius, MD
West Hartford, CT



More information about the R-help mailing list