Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Apl > APL - quickest ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 4 Topic 969 of 1019
Post > Topic >>

APL - quickest way?

by AAsk <AA2e72E@[EMAIL PROTECTED] > Mar 13, 2008 at 03:44 AM

Imagine a nested array like this:


ID     IND1    V1    IND2    V2    IND3    V3    DATE

1       A       100    -     -        -     -     2001-12-01
2       A        80    -     -        C    20     2001-12-01
3       B        70    C     5        D    10     2001-12-01

where - indicates a missing or unassigned value.

1. Quickest APL way to reformat it as follows?
   (replacing missing values by zero)

ID     IND      V       DATE

1       A       100     2001-12-01
1       B         0     2001-12-01
1       C         0     2001-12-01
1       D         0     2001-12-01
2       A        80     2001-12-01
2       B         0     2001-12-01
2       C        20     2001-12-01
2       D         0     2001-12-01
3       A         0     2001-12-01
3       B        70     2001-12-01
3       C         5     2001-12-01
3       D        10     2001-12-01

2. Quickest APL way to reformat it as follows?
   (lose rows with missing values)

ID     IND      V       DATE

1       A       100     2001-12-01
2       A        80     2001-12-01
2       C        20     2001-12-01
3       B        70     2001-12-01
3       C         5     2001-12-01
3       D        10     2001-12-01




 4 Posts in Topic:
APL - quickest way?
AAsk <AA2e72E@[EMAIL P  2008-03-13 03:44:35 
Re: APL - quickest way?
Gosi <gosinn@[EMAIL PR  2008-03-13 05:24:16 
Re: APL - quickest way?
AAsk <AA2e72E@[EMAIL P  2008-03-13 05:49:56 
Re: APL - quickest way?
Phil Last <phil.last@[  2008-03-14 01:19:04 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed May 14 13:05:19 CDT 2008.