[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Mata for data management

From   "Gabi Huiber" <[email protected]>
To   [email protected]
Subject   st: Re: Mata for data management
Date   Thu, 31 Jan 2008 21:48:53 -0500

I'm trying to cheat and speed things up a bit when dealing with a
bunch of files with names such as fileYYYYMMDD.dta. I could collect
the numeric part of the names in a column vector that starts with the
initial values a=J({potential number of files}, 1,0). But there is a
fair chance that my YYYYMMDD succession has gaps, so at the end of the
process this column vector will have some zeroes.

I would like to do this:


Then drop all the zero elements of a, and end up with a shorter
vector. But I can't find anything like "drop rows" in the Mata book or
Google. Any ideas?

Generally, some R-like way to deal with arrays would be nice to have
in Mata or Stata.

Thank you,
*   For searches and help try:

© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index