Feel free to skip this apologetic preface that applies to all questions I ask:
By way of excuse, I'm 74, and my memory has been failing little by little over the last number of years. I looked at some J code I had written 8-12 years ago and was astounded at what I used to be able to do--nothing major, mind you, but yet good, decent code! I've been sort of a lifetime "beginner" since 2006 (maybe reaching "advanced beginner", if there is such a thing!), doing programming on and off as I have need (which also doesn't help the memory). However, comparing what I wrote years ago with what I struggle with now is showing that my memory of what certain J primitives and combinations do is slipping with time. (Years ago I wrote my own beginner-level task-organized vocabulary of the kinds of things I typically need to do in my particular programming interests, and I heavily depend upon that until I run into something where the issue is not addressed in my compilation.) So, please bear with me when I ask questions with simple answers that you may think everybody should already know. I've been a hobbyist programmer since 1975, mostly with versions of BASIC. (I started with a MITS Altair PC and Microsoft's original BASIC. A good number of years ago I asked Bill Gates to autograph my manual for that BASIC since he wrote the code.) But times have changed, and now I simply LOVE working with the J language because it fits my needs so well in developing relatively simple programs (without writing all those loops!), especially for dealing with data and such in my stock market (and other) interests. I have no need to make my code tight, fast, or short, as perhaps most of you need to do in your work--for me, it just has to work correctly! After all that, finally, my QUESTION: J has all sorts of ways of creating, assembling, disassembling, selecting, changing, and finding data in atoms, lists, and tables. However, in no index of any of my books or ebooks about J, nor in the (old) Vocabulary, nor in NuVoc have I been able to find how to DELETE tables or any of their rows. For example, here is the cleaned up (of double quotation marks) beginning of unusually-formatted data from a particular data source that I'm trying to reformat according to standard: +---------|-----------|-- |May 08|May 07| +---------|-----------|-- | 2020 | 2020 | +---------|-----------|-- | 664.35| 652.35| +---------|-----------|-- | 660.21| 653.00| +---------|-----------|-- | 664.56| 657.12| +----------|----------|-- | 657.67| 651.29| +----------|-----------|-- | - | - | +----------|-----------|-- | 1.84% | 1.19% | +----------|-----------|-- I need to delete rows 0, 1, and 7--how to do that? (that is, leaving a new table of rows, formerly 2 to 6, now 0 to 4) One thought I had was maybe to use some sort of boolean mask expression using either 00111110 or its opposite 11000001. But, even using that in some way, I still don't know how to physically get rid of those rows, so that they don't exist any more. This question and its answer is probably a "piece of cake" for most of you, but, right now, the answer is not obvious to me. (After seeing one or more answers, I'll probably say to myself, "Of course! I should have known that!") By the way, just FYI, the first two deleted rows will be replaced with the row that was created in the question in my previous message, but that replacement is not what this question is dealing with--I'm rather sure I can deal with that without help at this point. After that, it's just a matter of moving one of the price rows to a different position, converting the hyphens to zeros, and chronologically reversing the data. I've never moved and inserted a row before, but I think I'll be able to figure that one out. (If not, you know I'll be back.) ;-) Again, thanks in advance for your help with this! Harvey ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
