Hi,
Relatively basic question: I am looking for a concise (1 line) alternative to inlist that would accept more arguments. Is there an "ssc install" that would fix this inlist() limitation?
Relatively basic question: I am looking for a concise (1 line) alternative to inlist that would accept more arguments. Is there an "ssc install" that would fix this inlist() limitation?
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str6 gvkey str2 linktype "001000" "NU" "001000" "NU" "001000" "LU" "001001" "NU" "001001" "LU" "001002" "NR" "001002" "NR" "001002" "NR" "001002" "LC" "001003" "NU" "001003" "NU" "001003" "LU" "001004" "NU" "001004" "NU" "001004" "LU" "001005" "NU" "001005" "LU" "001007" "LU" "001007" "LU" "001007" "NU" "001008" "NR" "001008" "LC" "001009" "NR" "001009" "NR" "001009" "NR" "001009" "LC" "001010" "LU" "001010" "LU" "001010" "NU" "001011" "NR" "001011" "NR" "001011" "LC" "001012" "NU" "001012" "LU" "001012" "NU" "001013" "NU" "001013" "LU" "001015" "NU" "001015" "LU" "001015" "NU" "001016" "NR" "001016" "NR" "001016" "LC" "001017" "NR" "001017" "NR" "001017" "LC" "001018" "LU" "001018" "NU" "001018" "LU" "001018" "NU" "001019" "NR" "001019" "NR" "001019" "NU" "001019" "LC" "001020" "NR" "001020" "NR" "001020" "NR" "001020" "LC" "001020" "NR" "001021" "NU" "001021" "NU" "001021" "LU" "001022" "LU" "001022" "NU" "001022" "LU" "001023" "NU" "001023" "NU" "001023" "LU" "001024" "NU" "001024" "LU" "001025" "NU" "001025" "LU" "001026" "NU" "001026" "NU" "001026" "LU" "001027" "NU" "001027" "LU" "001028" "NU" "001028" "LU" "001029" "NU" "001029" "LU" "001030" "NU" "001030" "LU" "001031" "LU" "001031" "LU" "001034" "NR" "001034" "LC" "001036" "NU" "001036" "NU" "001036" "LC" "001036" "NR" "001036" "LX" "001037" "NU" "001037" "NU" "001037" "LU" "001038" "NU" "001038" "LU" "001038" "NU" "001039" "NR" "001039" "NR" end
Code:
keep if inlist(linktype,"LU","LC","LU", "LC", "LD", "LF", "LN", "LO", "LS", "LX")
Comment