Snapshots

tnet » Longitudinal Networks » Snapshots
This page is not yet complete — please come back later
# Load tnet
library(tnet)

# Load the Facebook-like online social network
data(tnet)
lnet <- OnlineSocialNetwork.n1899.lnet

# Create the static network on June 30, 2004, at 7am
net <- as.static.tnet(lnet[lnet[,"t"]<as.POSIXlt("2004-06-30 07:00:00"),])

# Calculate network measures, such as the global clustering coefficient
clustering_w(net)

References

Kossinets, G., Watts, D. J., 2006. Empirical analysis of an evolving social network. Science 311, 88-90.

Opsahl, T., Hogan, B., 2011. Growth mechanisms in continuously-observed networks: Communication in a Facebook-like community. arXiv:1010.2141.

Panzarasa, P., Opsahl, T., Carley, K.M., 2009. Patterns and dynamics of users’ behavior and interaction: Network analysis of an online community. Journal of the American Society for Information Science and Technology 60 (5), 911-932.

If you use any of the information in this post, please cite: Panzarasa, P., Opsahl, T., Carley, K.M., 2009. Patterns and dynamics of users’ behavior and interaction: Network analysis of an online community. Journal of the American Society for Information Science and Technology 60 (5), 911-932

8 Comments Add your own

  • 1. Jon  |  July 16, 2013 at 7:22 pm

    Running the
    net <- as.static.tnet(lnet[lnet[,"t"]<as.POSIXlt("2004-06-30 07:00:00"),])
    Command returns a
    Error in as.static.tnet(lnet[lnet[, "t"] < as.POSIXlt("2004-06-30 07:00:00"), :
    object 'net' not found

    Do you have any thoughts?

    Thanks for all your help/publishing!

    Reply
    • 2. Tore Opsahl  |  July 16, 2013 at 7:36 pm

      Hi Jon,

      The net parameter is the network object. tnet examples assume that the object is called net; however, you can name it anything as long as you update the references to it in the code.

      Best,
      Tore

      Reply
  • 3. Jon  |  July 16, 2013 at 8:45 pm

    Ah. Thanks

    Reply
  • 4. Eseosa  |  May 6, 2014 at 2:07 pm

    When I ran:
    net <- as.static.tnet(lnet[lnet[,"t"]<as.POSIXlt("2004-06-30 07:00:00"),])

    I got the error:
    Error in as.tnet(net, type = "longitudinal tnet") :
    Type of network not recognised

    Reply
  • 6. Jonathan Kush  |  August 1, 2014 at 10:53 pm

    Hello Tore, when I try to create a static network I get this error:

    Error in data.frame(ld[index, c(“i”, “j”)], w = 0) :
    arguments imply differing number of rows: 0, 1

    I’ve run as.tnet(net, type =”longitudinal tnet”) without getting errors. Googling the error says that missing values can cause it but there are none in my data. Any suggestions?

    Thank you!

    Reply
    • 7. Tore Opsahl  |  August 2, 2014 at 2:09 am

      Jonathan,

      I’m not entirely what brings about this error. If you email me the code and data you have, I’ll have a look.

      Tore

      Reply
      • 8. Jonathan Kush  |  August 2, 2014 at 8:39 pm

        Thanks for your quick reply! I’m guessing it has something to do with how I structured my data table. I actually built longitudinal data from static networks anyway so it’s not too much of a problem. Thank you for making tnet!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Subscribe to the comments via RSS Feed


%d bloggers like this: