layoutGrid produces a grid layout of any number of nodes.

layoutGrid(N,string,name=NULL,byrow=FALSE)

Arguments

N

a data frame of nodes.

string

a character vector specifing grouped nodes.

name

name of column with node names.

byrow

logical. If 'FALSE' (the default) the layout is filled by columns, otherwise the layout is filled by rows.

Author

Modesto Escobar, Department of Sociology and Communication, University of Salamanca. See https://sociocav.usal.es/blog/modesto-escobar/

Value

This function returns the input data frame of nodes with the resulting layout applied.

Examples

A <- data.frame(name=letters) L <- layoutGrid(A,"a,b,c,d,e.f,g,h,i,j.k,l,m,n,o,p.q,r,s,t,u.v,w,x,y,z","name") netCoin(A,layout=L)
#> #> Nodes(26): #> name #> a #> b #> c #> d #> e #> f #> ... #>