Dear statalist,
I have a matrix in which two or more columns are exactly same. Is there some way of keeping one of them and dropping all others?
For example, I have the matrix
1 4 2 1 1
2 7 0 2 2
3 3 5 3 3
I want to drop the last two columns since they are same as the 1st column.
Thank you in advance.
Shoummo Sen Gupta
Related Posts with Dropping repeated columns from a matrix
Weighted Peer market Cap - Creating variable to copy dataDear Experts I have used STATA for some time but I am still amateur. I have to create weighted pee…
How can I solve an error when I use the command "append"?I´m using the command "append" to add four dta files. Each dta. file constains data on a quarter of …
Loop for sum with prefix-suffix variablesHello, I work with almost 2*80 variables with a prefix-suffix format like: A_CH1211, A_CH1212, A_CH…
convergence warning in PCA using polychoric correlationHello, I am working with a large survey data (N=220,000). The survey asks how often people use read…
How to flag an event of interest in a longitudinal datasetHi, I have a hospital admission data in which every patient may have one to hundreds of repeated ad…
Subscribe to:
Post Comments (Atom)
0 Response to Dropping repeated columns from a matrix
Post a Comment