Articles by Posts on GGVY

Working with sparse matrices in C++

January 15, 2018 | Posts on GGVY

Working with sparse matrices is a big part of my day. Social networks are inherently sparse, so sparse matrices are the best buds you can get when representing large networks as adjacency matrices.1 As so, I usually find myself trying to take advantage of their structure as, contrasting dense matrices, ... [Read more...]

Visualizing Phylogenetic Trees with R and jsPhyloSVG

December 7, 2017 | Posts on GGVY

During the last year I’ve been working on a daily basis with phylogenetic trees, objects that in graph jargon are called Directed Acyclic Graphs. While R does have some cool packages out there to visualize these–including phylocanvas which looks great!–I wanted to tryout jsPhyloSVG, and moreover, to ... [Read more...]

Read viz attributes from GEXF files

November 26, 2017 | Posts on GGVY

So one of the new features that I’ve working on is processing viz attributes. In the CRAN version of rgexf, the function read.gexf only reads in non-visual attributes and the graph structure itself, which is no longer true as of today (at least for the static viz attributes, ...
[Read more...]

Some notes on my first shiny app

November 15, 2017 | Posts on GGVY

Since there are plenty of examples out there telling you how to get started with shiny (like Rstudio’s, or Google), I will focus on telling some of the stuff that I did learned and may not be obvious at first, including some of the mistakes I made. Before start, ... [Read more...]

Reboot of rgexf

November 7, 2017 | Posts on GGVY

The rgexf R package has been around a couple of years now, but without much going on on CRAN (my bad!). In this post I’ll show how to use the new version (on development and soon the be shipped to CRAN) together with the netdiffuseR R package to visualize ... [Read more...]

Environments in R Rock

October 1, 2017 | Posts on GGVY

Last week I found myself working on netdiffuseR trying to establish nice defaults for some plotting functions with the following goals: Make the code easy to maintain: So if I need to change defaults I just change a few lines and that works for all plot functions, Make the code ... [Read more...]

Yet another plot of R’s colors()

September 14, 2017 | Posts on GGVY

I know there are plenty of these online, but I just thought about having my own for quick reference…
ncols <- ceiling(sqrt(length(colors())))^2
dat <- matrix(1:ncols, sqrt(ncols))
image(dat, col = colors()[1:ncols])
pos <- seq(0, 1, length.out = sqrt(ncols))
pos <- lapply(pos, function(x) cbind(x, pos))
pos <-, pos)

ncols <- length(colors())
text(x=pos[1:ncols,2], y=pos[1:ncols,1], labels = 1:ncols, cex=.75, srt=60)
[Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)