hi
thanks for your suggestion and reply. let me try it out.
With Warm Wishes and Regards
A. Abdul Rasheed, M.C.A., M.E., Ph.D.,
Assistant Professor,
Department of Computer Applications,
Valliammai Engineering College,
SRM Nagar, Kattankulathur
On Sat, Dec 11, 2010 at 05:11:37AM -0800, profaar wrote:
> hi
> thanks for your reply. there are around 2 nodes in my dataset. will it
> work for conversion from edge list format to node list format? I am using R
> under Windows XP.
>
Under Linux, with 20'000 nodes and 10 random edges fro
try this:
> x
X1 X2
1 1 3
2 1 4
3 1 5
4 2 3
5 2 4
6 3 2
7 4 1
8 4 3
9 4 5
10 5 2
11 5 4
> sapply(split(x, x$X1), function(.grp){
+ paste(.grp[[1]][1], paste(.grp[[2]], collapse = ','))
+ })
1 2 3 4 5
"1 3,4,5" "2 3,4"
hi
thanks for your reply. there are around 2 nodes in my dataset. will it
work for conversion from edge list format to node list format? I am using R
under Windows XP.
With Warm Wishes and Regards
A. Abdul Rasheed, M.C.A., M.E., Ph.D.,
A
On Fri, Dec 10, 2010 at 07:20:55AM -0800, profaar wrote:
>
> HI friends,
> I have very lengthy graph data in edge list format. I want to convert it
> into node list format.
>
> example:
> EDGE LIST FORMAT
> 1 2
> 1 3
> 1 4
> 1 5
> 2 3
> 2 4
> 3 2
> 4 1
> 4 3
> 4 5
> 5 2
> 5 4
>
> ITS NO
> From: jinyan...@gmail.com
> Date: Fri, 10 Dec 2010 17:20:00 +0100
> To: prof...@live.com
> CC: r-help@r-project.org
> Subject: Re: [R] help requested
>
> awk '{arr[$1]=arr[$1] " " $2}END{for( i in arr){print i
Try this:
> DF
V1 V2
1 1 2
2 1 3
3 1 4
4 1 5
5 2 3
6 2 4
7 3 2
8 4 1
9 4 3
10 4 5
11 5 2
12 5 4
> aggregate(V2 ~ V1, DF, paste, collapse = ' ')
V1 V2
1 1 2 3 4 5
2 2 3 4
3 3 2
4 4 1 3 5
5 5 2 4
On Fri, Dec 10, 2010 at 1:20 PM, profa
awk '{arr[$1]=arr[$1] " " $2}END{for( i in arr){print i,arr[i]}}'
edgelist.txt | sort -k1
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@r-project.org mailing list
ht
HI friends,
I have very lengthy graph data in edge list format. I want to convert it
into node list format.
example:
EDGE LIST FORMAT
1 2
1 3
1 4
1 5
2 3
2 4
3 2
4 1
4 3
4 5
5 2
5 4
ITS NODE LIST FORMAT SHOULD BE LIKE:
1 2 3 4 5
2 3 4
3 2
4 1 3
5 2 4
Kindly suggest me which package
9 matches
Mail list logo