Learn R Programming

egonet (version 1.0)

read.egonet: Reads ego-centric graph in table format and creates a matrix suitable for SNA.

Description

Reads text table and creates ego-centric graph from it, with the ego actor in the first row and column. The result is a square matrix with common input/output connection' names.

Usage

read.egonet(file, sep=",", dec=".", ego.name="EGO")

Arguments

file
the name of the file which the data are to be read from. It must be a square matrix, with node's names in the first row and column. See also file of read.table
sep
dec
ego.name
column and row name given to the ego subject. The default is EGO

Value

  • A square matrix containing the ego-centric network of the data in the file.

See Also

read.table

Examples

Run this code
dat <- read.egonet("http://associazionerospo.org/egonetdata/q1.csv")

dat

Run the code above in your browser using DataLab