Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: asarray_keys() error
From
Matthew White <[email protected]>
To
[email protected]
Subject
st: asarray_keys() error
Date
Wed, 15 May 2013 17:35:54 -0400
Hi Statalist members,
I'm running the following commands in Stata 12.1 SE:
mata:
A = asarray_create("string", 2)
asarray(A, ("type", "keep"), 1)
asarray(A, ("name", "char"), 2)
asarray_keys(A)
However, -asarray_keys()- issues the following error message:
asarray_keys_dup(): 3201 vector required
asarray_keys(): - function returned error
<istmt>: - function returned error
If I run -asarray()- for just one key, -asarray_keys()- does not
result in an error. For example:
mata:
A = asarray_create("string", 2)
asarray(A, ("type", "keep"), 1)
asarray_keys(A)
end
If I change any one of the elements of the keys, -asarray_keys()- also
does not result in an error:
mata:
A = asarray_create("string", 2)
asarray(A, ("example", "keep"), 1)
asarray(A, ("name", "char"), 2)
asarray_keys(A)
end
Any suggestions would be appreciated.
Thank you,
Matt White
--
Matthew White
Senior Project Associate
Innovations for Poverty Action
101 Whitney Avenue, New Haven, CT 06510 USA
www.poverty-action.org
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/