Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Column and row maximums


From   "Nick Winter" <nwinter@policystudies.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Column and row maximums
Date   Tue, 19 Nov 2002 09:34:07 -0500

> -----Original Message-----
> From: Chris.Fergusson@sth.nhs.uk [mailto:Chris.Fergusson@sth.nhs.uk] 
> Sent: Tuesday, November 19, 2002 9:26 AM
> To: statalist@hsphsun2.harvard.edu
> Subject: RE: st: Column and row maximums
> 
> 
> Sorry if I was ambiguous; from the datasheet
> 
> 	> A	B	C	D	E	F
> 	> 1	2	3	4	5	6
> 	> 2	8	5	4	9	6	
> 	> 3	5	7	8	6	1
> 	> 7	4	5	6	8	1
> 	> 2	4	6	4	1	6
> 
> I would simply like Stata to return something of the sort:
> 
> "Highest value in E was" 9 "and the corresponding value in B was" 8
> 

Ignorring ties:

	gsort -E
	di "Highest value in E was " E[1] " and the corresponding value
in B was " B[1]

--Nick Winter
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index