[R] result

David Winsemius dwinsemius at comcast.net
Tue Dec 17 08:49:35 CET 2013


On Dec 16, 2013, at 10:50 PM, 水静流深 wrote:

> Mydata is as under.
> dat="  salary   ex
> + 1   1856 1799
> + 2   1856 1800
> + 3   1858 1800
> + 4   1858 1801
> 
snipped
> + "
> 
> data<-read.table(text=dat,header=TRUE)
> 
> I want to get the result(please see the attatchment),the header is salary,the rownames is ex.
> I only can get the "total column"
> rev(table(cut(data[,2],breaks=seq(1795,1905,10),right=F))) 
> 
> How can I get the other data  by some code,not by hand?

Please do not crosspost to StackOverflow and Rhelp.
-- 


David Winsemius
Alameda, CA, USA



More information about the R-help mailing list