[R] character to numeric conversion
Robin Hankin
r.hankin at noc.soton.ac.uk
Mon Mar 19 12:20:25 CET 2007
Hello everybody
thanks for the tips.
I *think* this should be the same thread....
The manpage for system() says that lines of over 8095
characters will be split. This is causing me problems.
How do I get round the 8095 character limit?
Simple toy example follows:
jj <- system("echo 4 | awk '{for(i=1;i<100;i++){printf(\"%s,\",
$1)}}'| sed -e \"s/,$//\"",intern=T)
This is fine. But .. . .
jj <- system("echo 4 | awk '{for(i=1;i<10000;i++){printf(\"%s,\",
$1)}}'| sed -e \"s/,$//\"",intern=T)
has "jj" split into three bits, which is upsetting my call. In my
application
the split occurs in the middle of a multi-digit number, which messes up
my conversion to numeric?
--
Robin Hankin
Uncertainty Analyst
National Oceanography Centre, Southampton
European Way, Southampton SO14 3ZH, UK
tel 023-8059-7743
More information about the R-help
mailing list