I have a string matrix in Mata that I would like to write to csv. This post: https://www.statalist.org/forums/for...=1503609503040 discusses one possible solution, namely that I could exit mata and then use
getmata (var*)
This does work. But, it seems to require me to clear all of the data from Stata ahead of time, since the matrix that I have in Mata is not of the same dimensions as my data.
Is there any way to get a string matrix from mata to a csv file? I'm fine with a solution either that works directly from mata or one that involves first exporting the string matrix from mata to stata and then uses something like mat2txt to get it to csv.
getmata (var*)
This does work. But, it seems to require me to clear all of the data from Stata ahead of time, since the matrix that I have in Mata is not of the same dimensions as my data.
Is there any way to get a string matrix from mata to a csv file? I'm fine with a solution either that works directly from mata or one that involves first exporting the string matrix from mata to stata and then uses something like mat2txt to get it to csv.
Comment