On Mon, Sep 15, 2014 at 3:23 PM, Doran, Harold <[email protected]> wrote: > Thank you, Gabor. This has seemingly resolved the issue. Perhaps a quick > follow up. Suppose I know that the 1st variable I am reading in is to be > numeric and the second is character. Can that be specified in the substr() > argument? > > sqldf("select substr(V1, 1, 1) f1, substr(V1, 2, 4) f2 from fixed") >
Cast the numeric field to real: select cast(substr(V1, 1, 1) as real) ... ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

