Statalist The Stata Listserver

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

st: Defining a matrix of Characters

From   "Siyam, Amani" <>
To   <>
Subject   st: Defining a matrix of Characters
Date   Tue, 14 Mar 2006 19:18:46 +0100

Dear Stata-listers,

Could you kindly tell me if it is possible to define a matrix A[1x6] of
characters as follows:

matrix A=[a b c d e f]

I tried going the long route as follows:

	foreach i in a b c d e f  {
		gen `i'= "`i'"
	mkmat a b c d e f , matrix(A)
	varlist:  a:  string variable not allowed

I got an error message as you can see...

Thanks in advance.


*   For searches and help try:

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