Bookmark and Share

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: mata: columns of different eltypes in a transmorphic matrix


From   László Sándor <[email protected]>
To   [email protected]
Subject   st: mata: columns of different eltypes in a transmorphic matrix
Date   Wed, 9 Oct 2013 20:56:54 -0400

Hi all,

I am confused by some behavior in StataMP 13 on my mac.

I am pretty sure that a transmorphic matrix can have columns (or
simply cells) of different types, as you can easily grab some Stata
data with  st_data and the resulting matrix will hold both strings and
reals according to your Stata variables.

But then I am not sure I understand why Stata complains about joining
transmorphic matrices into a transmorphic matrix if some of them
happen to hold reals and other strings. Why isn't this OK if I mean
the end result to hold cells of both types?

I tried to define a transmorphic placeholder first and fill in the
columns one by one, but if I start with (transmorphic colvectors
happening to be:) real colvectors the code breaks when I get to the
string colvector.

I don't see why this is invalid or why this limitation isn't better
documented. In any case, it would be nice to have a way around this.

Thanks!
*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index