Learn R Programming

netCoin (version 2.1.49)

addNetCoin: Networked coincidences.

Description

addNetCoin changes netCoin object attributes.

Usage

addNetCoin(x, ...)

Value

This function returns a netCoin object. If the 'dir' attribute is specified, the function creates a folder in the computer with an HTML document named index.html which contains the produced graph. This file can be directly opened with your browser and sent to a web server to work properly.

Arguments

x

A 'netCoin' object.

...

Any netCoin argument.

Author

Modesto Escobar, Department of Sociology and Communication, University of Salamanca.

Details

The object is rebuilt out of its own options, with the ones stated here replacing them, so anything not among the arguments of netCoin would be lost in the rebuilding and is carried over instead: the planes addAxes added, and what a scattergram records about how its nodes stand for the cases, which addClusters, addCommunities and replaceClusters read afterwards. Stating layout replaces the planes, as asked; replacing nodes with a table of another length carries none of it over, since none of it would describe those nodes.

Nodes drawn with no label at all, as surScat draws them, keep it that way. A label is restored by naming its column, as in label="name".

References

Escobar, M. and Martinez-Uribe, L. (2020) Network Coincidence Analysis: The netCoin R Package. Journal of Statistical Software, 93, 1-32. tools:::Rd_expr_doi("10.18637/jss.v093.i11").

Examples

Run this code
# A character column (with separator)
frame <- data.frame(A = c("Man; Women", "Women; Women",
                        "Man; Man", "Undet.; Women; Man"))
data <- dichotomize(frame, "A", sep = "; ")[2:4]
C <- coin(data) # coincidence matrix
N <- asNodes(C) # node data frame
E <- edgeList(C) # edge data frame
net <- netCoin(N, E) # netCoin object
net <- addNetCoin(net, color="frequency") # netCoin object with color applied to nodes

Run the code above in your browser using DataLab