[Jprogramming] Faster way to replace commas in boxed data
PGauthier at checkfree.com
PGauthier at checkfree.com
Fri Mar 3 00:00:28 HKT 2006
A=:".rplccomma,' ',"1>DATA NB. But you are limited on the size of DATA and
homogeneity... You might have to partition in large chunks before
Paul Gauthier
APL Software Developer - Senior
pgauthier at checkfree.com
Phone: 312-739-3467
Fax: 312-739-3496
CheckFree. The Company that Powers Payment on the WebSM.
http://www.checkfree.com/paybillsonline
Anssi Seppälä <anssi.seppala at enease.fi>
Sent by: programming-bounces at jsoftware.com
03/02/2006 03:59 AM
Please respond to
Programming forum <programming at jsoftware.com>
To
Programming forum <programming at jsoftware.com>
cc
Subject
[Jprogramming] Faster way to replace commas in boxed data
Reading numeric data from Excel the decimal separator is here comma "
, ". Since in J the text-to-num-conversion function ". does not
understand comma as decimal separator I must change the commas in the
boxed matrix DATA to dots. I could write a short function:
rplccomma=: 3 : '''.'' (I. y. e. '','')} y.'
and then run
NUM= . ". each rplccomma each DATA.
For large DATA this takes long time to run. Ideas to make this
conversion faster are wellcome. Thanks.
Anssi
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list