# Blog Archives

## igraph degree distribution: count elements

February 13, 2013
By

Unfortunately, the degree.distribution() function of the igraph library returns the intensities of the distribution:> g > plot(g) > summary(g)IGRAPH U--- 10 10 -- Ring graphattr: name (g/c), mutual (g/x), circular (g/x) So instead of having the number of elements, the density/intensities value is returned:> degree.distribution(g) 0 0 1 You can easily verify this in the source code...

## Presentation at the RECENS Group

November 13, 2012
By

I had a great opportunity to present my work on dynamic networks for the RECENS Group today at the  Hungarian Academy of Sciences, Centre for Social Sciences.It was a great honor, many thanks for the organizers, Károly Takács and Judit Pál for giving me the chance to get some feedback on my work. The...

## Multiple levelplots with title and subtitle in R

October 23, 2012
By

I had quite a fight with R to put multiple levelplots with a shared title and subtite on the same chart, so I thought I put a PoC code here: library(lattice)m col.l plot.new()par(mfrow=c(2,2), oma=c(2,0,2,0))print(levelplot(m, col.regions=col.l, main="L1"), split=c(1, 1, 2, 2)) print(levelplot(m, col.regions=col.l, main="L2"), split=c(1, 2, 2, 2), newpage=FALSE)print(levelplot(m, col.regions=col.l, main="L3"), split=c(2, 1, 2, 2), newpage=FALSE)print(levelplot(m, col.regions=col.l, main="L4"), split=c(2,...

## igraph 0.6 issues: Changed numbering of Vertices

September 10, 2012
By

I have tried one of my previous scripts with an updated igraph version and I got an interesting (pretty much unexpected) error:At type_indexededgelist.c:269 : invalid (odd) length of edges vector, Invalid edge vectorThe problem is that it was a well-te...

## R-bloggers submission

September 10, 2012
By

I might be the 393rd blogger on the R-bloggers.com :-)  http://www.r-bloggers.com/Wohoo!

## Setting the Default RNG Seed in R

March 4, 2012
By

How to set the default seed for the RNG behind the runif(), sample() and other command? Well, there are several ways doing that (like setting .Random.seed directly), but as the documentation states, set.seed() is the recommended way to specify seeds.> ?set.seed> set.seed(0)> runif(1,0,1) 0.8966972> set.seed(0)> runif(1,0,1) 0.8966972> set.seed(0)> sample(1:10, 10) 9 3 10 5 ...

## R subplot() with multiple lines

September 11, 2011
By

I have recently used the subplot() function of the TeachingDemos library for R: I wanted to create a simple embedded chart with multiple lines on it. The trick was to create a simple function that prepares the whole plot and pass it to the subplot() function to execute as shown below: > x > x() > plot(1:10)...

## Multiple plots with subplot in R

September 8, 2011
By

I'm in the middle of creating a poster and wanted to compresss the content by transforming some of the charts into subplots of other charts.I made a little survey and found that there is a TeachingDemos library in CRAN that fits my needs. Well, the parameterization of the functions is a bit tricky but after a few tries...

## Free R Book Collection

September 6, 2011
By

I have just encountered some R PDF books that seem quite interesting. One of them is written by Venables himself.The Art of R Programming by Norman MatloffAn Introduction to R by W.N. Venables and D. M. SmithThe R Inferno by Patrick BurnsThe R Guide by...