[R-SIG-Finance] Mode list to mode numerical.... fast..

Steve Greiner sgreiner at factset.com
Thu May 1 15:47:57 CEST 2014


Okay, I've had it!!!..   Every time I read in a dataset using something like:
returnmatrix = read.csv("S&P.csv", header=TRUE, sep=",")    

It comes back with "returnmatrix" as mode list.   How can I quickly convert the dataset to mode numerical?   This is pissing me off.  I can do it manually by creating a new matrix and assigning values of the list matrix to the values of the numerical matrix element by element, but it's time consuming.  What can anybody recommend me?
Steve

Steven P. Greiner, Ph.D.
Director of Portfolio Risk
FactSet Research Systems, Inc.
sgreiner at factset.com



More information about the R-SIG-Finance mailing list