In the future it would be easier to read and later test your email if there
were no extra lines. At least with gmail this can be accomplished by using
"paste special" instead of "paste".
When I attempt to execute your code, I do not get an error at first, when I
use your first definition of numCols, but then I get domain error when I
use your second definition of numCols.
numCols =: [: <@:(a:&;) [: i.&.:(-&3) [: {:@:$ ]
_99 (newData`numCols`] }) data
+-+-+-+--+--+---+
|a| |d|10|11|12 |
+-+-+-+--+--+---+
|f|g|h|13|99|15 |
+-+-+-+--+--+---+
|j|k|z|99|17|18 |
+-+-+-+--+--+---+
|x|c|v|19|20|21 |
+-+-+-+--+--+---+
|b|n|m|22|23|_99|
+-+-+-+--+--+---+
numCols =: [: < (<a:) replaceEmpty (_1 * #@:$) {. [: < [: i.&.:(-&3) [:
{:@:$ ]
_99 (newData`numCols`] }) data
|domain error: numCols
| _99 (newData`numCols`]})data
--
(B=) <-----my sig
Brian Schott
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm