R

Blogs on the R software.

sequence riddle

August 9, 2017
By
sequence riddle

The riddle this week on The Riddler was about finding the largest sequence of integers between 1 and 100 such that each integer is only used once and always followed by a multiple or a factor. A basic R code searching at random [and programmed during a massive downpour on Skye] led to a solution […]

Read more »

Le Monde puzzle [#1707]

July 27, 2017
By
Le Monde puzzle [#1707]

A geometric Le Monde mathematical puzzle: Given a pizza of diameter 20cm, what is the way to cut it by two perpendicular lines through a point distant 5cm from the centre towards maximising the surface of two opposite slices?  Using the same point as the tip of the four slices, what is the way to […]

Read more »

Options for teaching R to beginners: a false dichotomy?

July 27, 2017
By
Options for teaching R to beginners: a false dichotomy?

I've been reading David Robinson's excellent blog entry "Teach the tidyverse to beginners" (http://varianceexplained.org/r/teach-tidyverse), which argues that a tidyverse approach is the best way to teach beginners.  He summarizes two competing cu...

Read more »

thinking with data with "Modern Data Science with R"

July 26, 2017
By
thinking with data with "Modern Data Science with R"

One of the biggest challenges educators face is how to teach statistical thinking integrated with data and computing skills to allow our students to fluidly think with data.  Contemporary data science requires a tight integration of knowledge...

Read more »

Stippling and TSP art in R: emulating StippleGen

July 24, 2017
By
Stippling and TSP art in R: emulating StippleGen

Stippling is the creation of a pattern simulating varying degrees of solidity or shading by using small dots (Wikipedia).StippleGen is a piece of software that renders images using stipple patterns, which I discovered on Xi’an’s blog a couple days ago. StippleGen uses an algorithm by Adrian Secord (described here) that turns out to be related […]

Read more »

How to run a course (if you’re me)

July 17, 2017
By

Last summer, I and my trusty henchpeople from the Department of Politics ran an intensive six week summer course for incoming freshmen on data science (‘POL245’, for locals)....

Read more »

RNG impact on MCMC [or lack thereof]

July 12, 2017
By
RNG impact on MCMC [or lack thereof]

Following the talk at MCM 2017 about the strange impact of the random generator on the outcome of an MCMC generator, I tried in Montréal airport the following code on the banana target of Haario et al. (1999), copied from Soetaert and Laine and using the MCMC function of the FME package: library(FME) Banana <- […]

Read more »

easy riddle

July 11, 2017
By
easy riddle

From the current Riddler, a problem that only requires a few lines of code and a few seconds of reasoning. Or not. N households each stole the earnings from one of the (N-1) other households, one at a time. What is the probability that a given household is not burglarised? And what are the expected […]

Read more »

[un]solved riddles

July 3, 2017
By
[un]solved riddles

On the Riddler of last week, first a birthday puzzle: Given a group of 23 persons, what is the probability of observing three pairs of identical birthdays? which can be found by a quick simulation as ave=0 for (t in 1:1e6){ dupz=dates[duplicated(sample(1:365,23,rep=TRUE))] ave=ave+as.integer((length(dupz)==3)& (length(unique(dupz))==3))}} ave/M returning a value of 0.0183, but which combinatoric resolution I […]

Read more »

Julia vs R and Python: what does Stack Overflow Developer Survey 2017 tell us?

June 27, 2017
By

TLDR: Most Julia programmers also use Python. However, among all languages R is the one whose users are most likely to also develop in Julia.Recently Stack Overflow has made public the results of Developer Survey 2017. It is definitely an interesting d...

Read more »


Subscribe

Email:

  Subscribe