Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: Extracting a submatrix based on multiple conditions


From   Partho Sarkar <partho.ss@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Extracting a submatrix based on multiple conditions
Date   Fri, 1 Jul 2011 19:58:55 +0530

Thank you very much, Nick.

Regards
P.Sarkar

Nick Cox

: select(y, (y[,2] :== 1 :& y[,3] :== 1))
           1       2       3       4       5
    +-----------------------------------------+
  1 |  18049       1       1      91    2500  |
  2 |  18079       1       1     124    2300  |
    +-----------------------------------------+
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index