getDefaultOptions()list of parameters with default values
v <- c(0, 0, 1, 1, 0,
0, 0, 0, 0, 0,
-1, 0, 0, 1, 0)
a <- matrix(v, 3, 5)
colnames(a) <- LETTERS[1:5]
rownames(a) <- LETTERS[1:3]
opts <- getDefaultOptions()
opts$nodeLabelsFont <- '16px sans-serif'
g <- graph2js(A=a, opts=opts)
Run the code above in your browser using DataLab