Learn R Programming

scholarnetwork (version 0.1)

plotNetwork: Plot collaborators network from Google Scholar page

Description

Takes value from extractNetwork function and visualizes network using networkD3.

Usage

plotNetwork(nodes, edges, file = "network.html", width = 550, height = 400, opacity = 0.75, fontsize = 10, charge = -500, ...)

Arguments

nodes
Data frame with node information returned by extractNetwork.
edges
Data frame with edge list returned by extractNetwork.
file
File where network visualization will be exported to.
width
numeric width for the network graph's frame area in pixels
height
numeric height for the network graph's frame area in pixels.
opacity
numeric value of the proportion opaque you would like the graph elements to be.
fontsize
numeric font size in pixels for the node text labels.
charge
numeric value indicating either the strength of the node repulsion (negative value) or attraction (positive value).
...
Other options to pass to networkD3 function

#'

Details

plotNetwork

Examples

Run this code
## Not run: 
# ## Download Google Scholar network data for a sample user
# d <- extractNetwork(id="jGLKJUoAAAAJ", n=500)
# ## Plot network into file called \code{network.html}
# plotNetwork(d$nodes, d$edges, file="network.html")
# ## End(Not run)

Run the code above in your browser using DataLab