igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] author lists to network


From: Alex D'Amour
Subject: Re: [igraph] author lists to network
Date: Wed, 9 Mar 2011 19:31:34 -0500

Stuart,

The best way to do this is to first construct a list that maps author
to paper. You should do this in a dataframe with columns Paper and
Author:

Paper, Author
Paper1, John
Paper1, Mary
Paper1, Sam
Paper2, Roger
etc...

Then you can use the merge command in R to merge this dataframe with itself:

df2 <- merge(df, df, by="Paper")

This will give you a dataframe like the one that you want. You will
probably want to filter out the self loops:

df3 <- df2[df2$author.x != df2$author.y,]

This should get you what you're looking for.

HTH,
Alex

On Wed, Mar 9, 2011 at 7:10 PM, Stuart Kininmonth
<address@hidden> wrote:
> Hi Networkers,
>
>
>
> Just trying to take a large list of authors who have worked on papers and
> turn into network in R igraph.
>
> So input looks like (simplified but can be any number of authors per paper):
>
> Paper1, John, Mary, Sam
>
> Paper 2, John, Roger, Trevor, Sue, Peter
>
> Etc…
>
>
>
> I need to make it a pair wise list (or alternative for igraph input) for
> each row so looking like this:
>
> John, Mary
>
> John, Sam
>
> Mary, Sam
>
> John, Roger
>
> John, Trevor
>
> John, Sue
>
> John, Peter
>
> Roger, Trevor
>
> Roger, sue
>
> Roger, peter,
>
> Trevor, sue
>
> Trevor, peter
>
> Sue, peter
>
> Etc…
>
>
>
> Any suggestions welcomed.
>
>
>
> cheers
>
>
>
>
>
> Stuart Kininmonth
>
> Spatial Ecologist
>
> Australian Institute of Marine Science
>
> PMB #3, Townsville, Qld, 4819 Australia
>
> w: 61 7 47534334
>
> m: 0439 673 546
>
>
>
> “It is the set of the sails, not the direction of the wind that determines
> which way we will go.” Jim Rohn
>
>
>
>
>
> --
> ------------------------------------------------------------------------
> The information contained within this transmission is for the
> use of the intended recipient only and may contain confidential
> and/or legally privileged material and/or material the subject
> of copyright and/or personal information and/or sensitive
> information that is subject to the Privacy Act 1988. Any review,
> re-transmission, disclosure, dissemination or other use of, or
> taking of any action in reliance upon, this information by
> persons or entities other than the intended recipient is
> prohibited. If you have received this email in error please
> notify the AIMS Privacy Officer on (07) 4753 4444 and delete
> all copies of this transmission together with any attachments.
> ------------------------------------------------------------------------
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]