[R] help requested

Mike Marchywka marchywka at hotmail.com
Fri Dec 10 18:55:32 CET 2010










----------------------------------------
> From: jinyan.fr at gmail.com
> Date: Fri, 10 Dec 2010 17:20:00 +0100
> To: profaar at live.com
> CC: r-help at r-project.org
> Subject: Re: [R] help requested
>
> awk '{arr[$1]=arr[$1] " " $2}END{for( i in arr){print i,arr[i]}}'
> edgelist.txt | sort -k1

My first thought PERL hash but I guess my answer would
still be to consider any R hash-like structures. I guess any array
that accepts arbitrary subscripts amounts to a hash.



>
>
>
> On Fri, Dec 10, 2010 at 4:20 PM, profaar  wrote:
> > 1 2
> > 1 3
> > 1 4
> > 1 5
> > 2 3
> > 2 4
> > 3 2
> > 4 1
> > 4 3
> > 4  5
> > 5 2
> > 5 4
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
 		 	   		  


More information about the R-help mailing list