0

I've run across some example R code (using the statnet and network packages) that contains a few notations i'm not familiar with...not unusual as i'm a VERY casual R user.

I'm wondering specifically about "%v% and "%e%".

Examples:

item.statnet%v%"foo"=log(item.codegree) plot.network(item.statnet,edge.col="gray",edge.lwd=item.statnet%e%"edge.lwd",label="vertex.names")

I've tried some searches but strings like "R" and "%e%" don't work well with google, apparently.....

  • 1
    You should be able to find the help page in R with `?"%e%"`. Those seem to be specifically from the `network` package and also are on the help page for `?network.extraction` – MrFlick Sep 12 '22 at 14:34

2 Answers2

0

Took ??"%e%" but wouldn't have gotten there without your ?"%e%" suggestion so thank you!

0

%v% is a vertex attribute operator:

It can be used in place of get.vertex.value() to retrieve the values for the vertices of a network or it can be used in place of set.vertex.value() to set values for vertices.

%e% is an edge attribute operator:

It can be used in place of get.edge.value() to retrieve the values for the outer edges of a network or it can be used in place of set.edge.value() to set values for extant (pre-existing) edges.

Roman
  • 18
  • 4