I've got a problem. I need to create network graph where avatars are nodes (different sizes). Similar to this one:
Furthermore on this image every avatar has the same size, what I need to do is different size of avatar depending on a chosen statistic (e.g. in-degree). I cannot find any tutorial in R, which explains how to do that.
I would suggest taking a look at NetworkX in Python, to add to the tremendous list of recommendations you're getting. I've found it to be quite flexible. It expressly allows things like images to be nodes:
You might notice that nodes and edges are not specified as NetworkX objects. This leaves you free to use meaningful items as nodes and edges. The most common choices are numbers or strings, but a node can be any hashable object (except None), and an edge can be associated with any object x using
This thread on their message list suggests people have been thinking about problems similar to yours, and I've found their community quite helpful.
If nothing else, NetworkX can absolutely calculate almost any graph measure you could care to think about, and lay out the graph for you using "avatar sized squares" which you could use to bring in the actual images.