Linked Questions

Popular Questions

Column showing values as list

Asked by At

I am new to R and I am using the inbuilt function SpreadApproxOption to value an option.

I have a data frame and I want to apply the function to each row. I want the results to be stored in a new column in data.frame call_price. The inputs to the function are values from the columns in the data.frame. I am using the mapply function to do so.

However, the output I am getting in the column is not any number but some text.

new("fOPTION", call = SpreadApproxOption(TypeFlag = x1, S1 

The class of the column call_price is list but I want it as a numeric value for each row. (The output seems to be parameters of the function as well but I just need the numeric value).

Kindly help.

Related Questions