Blog Archives

Know any R blogs in your own language?

November 13, 2010
By
Know any R blogs in your own language?

A happy announcement Hello everyone. After playing around with the idea of extending R-bloggers to languages other then English, today I went a head and did it. The new sub-site can be found at: http://www.r-bloggers.com/lang/ So far it offers the content of only 3 4 bloggers, writing posts about R in Indonesian, Italian, Dutch and Korean. Asking for help As opposed to...

Read more »

R-bloggers for other languages – wanna join?

October 17, 2010
By
R-bloggers for other languages – wanna join?

Hello everyone. Recently I’ve been toying with the idea of extending R-bloggers to other languages then English.  After running some checks, I believe it is possible to do (under a sub website inside R-bloggers.com), where people would be able to follow R content on a “language category” of their choosing. Such a project could help map out all the...

Read more »

Means By

October 4, 2010
By

The other day I was asked by a coworker hos to do a SAS Means By statement in R. I embarrassingly did not know how to so I wrote something up, and this is what I came up with, it takes a data.frame and an indexing variable and computes the means for each group defined

Read more »

R-bloggers announcement – maintenance mode – site might be down

September 2, 2010
By

Hello dear followers of R-bloggers.com Today (and probably in the next few days), R-bloggers will be down part of the time due to maintenance work. (Technical stuff: I am moving the site from shared hosting to VPS, and there seem to be a few bumps in the road) Sorry for the inconvenience, I will update once it would look...

Read more »

A new Q&A website for Data-Analysis (based on StackOverFlow engine) – is waiting for you

June 17, 2010
By
A new Q&A website for Data-Analysis (based on StackOverFlow engine) – is waiting for you

What is the StackOverFlow Q&A website about? StackOverFlow.com (“SO” for short) is a programming Q & A site that’s free. Free to ask questions, free to answer questions, free to read. Free, And fast. For the R community, SO offers a growing database of R related questions and answer (click the link to check them out). You might be asking yourself what’s...

Read more »

R frustration of the day

April 11, 2010
By

Whenever you take a 1 column slice of a matrix, that gets automatically converted into a vector. But if you take a slice of several columns, it remains a matrix. The problem is you don’t always know in advance how big the slice will be, so if you do this: newMatrix

Read more »

R: another nifty graph

April 8, 2010
By
R: another nifty graph

Make sure to click on the image to see the large version. Code for this graph: moxbuller = function(n) { u = runif(n) v = runif(n) x = cos(2*pi*u)*sqrt(-2*log(v)) y = sin(2*pi*v)*sqrt(-2*log(u)) r = list(x=x, y=y) return(r) } r = moxbuller(50000) par(bg="black") par(mar=c(0,0,0,0)) plot(r$x,r$y, pch=".", col="blue", cex=1.2)

Read more »

R plotting fun

March 25, 2010
By
R plotting fun

Not easy to produce cool looking graphs in R, but it can be done. The results of some messing around are above. Here is the code I used:

Read more »

R: Add vertical line to a plot

March 21, 2010
By

If you have a plot open and want to add a vertical line to it: abline(v=20) #Add vertical line at x=20

Read more »

R: Geometric mean

March 21, 2010
By

gm(x) But this requires package heR.Misc so you might as well just use: exp(mean(log(x)))

Read more »