Ilaria Mosca <[email protected]> writes,
> I am trying to create a column vector containing the names of the files in
> dir that match pattern. For this purpose I looked at the online help, under
> -help mf dir. Subsequently I type the following:
>
> dir(".", "files", "*")
>
> but then I obtain the following error message:
> dir(".", "files", "*")
> invalid '".'
> r(198);
>
> What am I doing wrong?
Ilaria is tying Mata's -dir()- at Stata's dot prompt, which I can tell
because of the r(198). Mata would have said something different.
To type:
. mata
: dir(".", "files", "*")
<lots of output will appear}
: x = dir(".", "files", "*") // to store result in x
-- Bill
[email protected]
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/