May 2014

Notes from the Kölner R meeting, 23 May 2014

May 27, 2014 | Markus Gesmann

The 10th Kölner R user meeting took place last Friday at the Institute of Sociology and to celebrate the anniversary we invited Andrie de Vries to join us from Revolution Analytics. Andrie is well known in the R community; he is the co-author of the R for Dummies book ... [Read more...]

PERFORMANCE: captureOutput() is much faster than capture.output()

May 26, 2014 | Henrik Bengtsson

The R function capture.output() can be used to “collect” the output of functions such as cat() and print() to strings. For example,
> s <- capture.output({<br>+     cat("Hello\nworld!\n")<br>+     print(pi)<br>+ })<br>> s<br>[1] "Hello"        "world!"       "[1] 3.141593"<br>
More precisely, it captures all output sent to the standard output and returns a character vector where each element correspond to a line of output. By ... [Read more...]

Twinkle,twinkle little STAR

May 26, 2014 | alexios

At the recent R/Finance 2014 conference in Chicago I gave a talk on Smooth Transition AR models and a new package for estimating them called twinkle. In this blog post I will provide a short outline of the models and an introduction to the package and its features. Financial markets ... [Read more...]

Sunsets in Google Calendar using R

May 26, 2014 | hilaryparker

I live (and work!) near one of the most beautiful vantage points for sunsets in possibly the entire US. However almost every beautiful sunset I have seen from there has come from either 1) me walking out of work and … Continue reading → [Read more...]

Celebrity twitter followers by gender

May 25, 2014 | benjaminlmoore

The most popular accounts on twitter have millions of followers, but what are their demographics like? Twitter doesn’t collect or release this kind of information, and even things like name and location are only voluntarily added to people’s profiles. Unlike Google+ … Continue reading → [Read more...]

Significant birthdays in the weekend

May 25, 2014 | Wingfeet

I am a listener to BBC's podcast More or Less. In the program Tim Harford looks at data with both humour and determination to find what the numbers mean. Last week he handled a listener question. Does everybody get a significant birthday (20, 30 years ... [Read more...]

Basic recommendation engine using R

May 25, 2014 | suresh kumar Gorakala

In our day to day life, we come across a large number of Recommendation engines like Facebook Recommendation Engine for Friends’ suggestions, and suggestions of similar Like Pages, Youtube recommendation engine suggesting videos similar to our previous searches/preferences. In today’s blog post I will explain how to build ... [Read more...]

Vectorized vs Devectorized

May 24, 2014 | romain francois

This gist from @hadley has been on my mind for some time. This was already a follow up of this post from @johnmyleswhite. The problem was that sugar vectorised code suffered a performance penalty compared to devectorised code. This is particularly troubling me because the whole point of sugar is ... [Read more...]

Reduce in Rcpp11

May 23, 2014 | romain francois

And now for something completely difference, the reduce function, doing something similar to what the Reduce function does in R: #include using namespace Rcpp ; // [[Rcpp::export]] double reduce_example(NumericVector x ){ auto ad... [Read more...]

A taste of functional programmming in Rcpp11

May 23, 2014 | romain francois

@kevinushey requested some functional programming in Rcpp11 and provided initial versions of map and filter. map is actually doing exactly the same thing as mapply so I added map as a synonym to mapply so that we can do (see this previous post for details):
// [[Rcpp::export]]
NumericVector mapply_example(NumericVector x, NumericVector y, double z){

    auto fun = [](double a, double b, double c){ return a + b + c ;} ;
    return map( fun, x, y, z ) ;

}
filter takes a sugar ... [Read more...]

Recreational Data: Data Golf

May 23, 2014 | Tony Hirst

I’m still hopeful of working up the idea of recreational data as a popular pastime activity with a regular column somewhere and a stocking filler book each Christmas (?!;-), but haven’t had much time to commit to working up some great examples lately:-( However, here’s a ... [Read more...]
1 2 3 4 5 12

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)