2089 search results for "twitteR"

Le Monde puzzle [#4]

February 4, 2011
By
Le Monde puzzle [#4]

A fairly simple puzzle in this weekend Le Monde magazine: given five points on a line such that their pairwise distances are 1,2,4,…,14,18,20, find the respective positions of the five points over the line and deduce the missing distances. Without loss of generality, we can set the first point at 0 and the fifth point

Read more »

Speed up your R code with C++

February 3, 2011
By
Speed up your R code with C++

Hi again, Recently, Julyan blogged about allocating memory first before modifying R objects. That’s a very useful trick that applies to most programming languages. Tonight I want to blog about something a bit more complicated and more specific to R, but which can lead to massive speed-ups: interfacing C/C++ within R codes. The rationale behind

Read more »

Mixed Models – Part 1

February 3, 2011
By
Mixed Models – Part 1

Very brief. Have been exploring mixed models in R using nlme::lme. Am looking forward to understanding them more, they’re going to be used more and more in years to come I’ve no doubt of that. Here are some scripts, very rough, for diagnostics when running simple 2 levels, or models with 1 grouping variable. CLICK

Read more »

A legitimate use for the stupidest variable name ever

February 2, 2011
By
A legitimate use for the stupidest variable name ever

The help page to make.names describes how to make a valid variable name in R: A syntactically valid name consists of letters, numbers and the dot or underline characters and starts with a letter or the dot not followed by a number. Names such as ‘”.2way”’ are not valid, and neither are the reserved words.

Read more »

Teach Yourself How to Create Functions in R

February 1, 2011
By
Teach Yourself How to Create Functions in R

As you can tell from my previous posts, I am diving in head first into learning how to program (and simplify) my analytical life using R.  I have always learned by example and have never really prospered from the “learn from scratch” school of thought.  As I follow along with some other fellow R programmers,

Read more »

Tricks to manage memory in an R session

January 31, 2011
By

Unless you're using an out-of-memory solution to manage large data objects (such as the RevoScaleR package in Revolution R Enterprise), then R always allocates memory for every object in your working session. If you're working with many objects (or even just a few large objects) then you'll need to take care to manage R's memory usage to avoid the...

Read more »

ABC model choice not to be trusted [3]

January 30, 2011
By
ABC model choice not to be trusted [3]

On Friday, I received a nice but embarrassing email from Xavier Didelot. He indeed reminded me that I attended the talk he gave at the model choice workshop in Warwick last May, as, unfortunately but rather unsurprisingly giving my short span memory!, I had forgotten about it! Looking at the slides he joined to his

Read more »

R exam

January 30, 2011
By
R exam

I spent most of my Saturday perusing R codes to check the answers written by my students to the R exam I gave two weeks ago… The outcome is mostly poor, even though some managed to solve a fair part of the long problem. Except for the few hopeless cases who visibly never wrote a

Read more »

R programming books (updated)

January 28, 2011
By
R programming books (updated)

In a recent post, I asked for suggestions for introductory R computing books. In particular, I was looking for books that: Assume no prior knowledge of programming. Assume very little knowledge of statistics. For example, no regression. Are cheap, since they are for undergraduate students. Some of my cons aren’t really downsides as such. Rather,

Read more »

ABC model choice not to be trusted [2]

January 27, 2011
By
ABC model choice not to be trusted [2]

As we were completing our arXiv summary about ABC model choice, we were helpfully pointed to a recent CRiSM tech. report by X. Didelot, R. Everitt, A. Johansen and D. Lawson on  Likelihood-free estimation of model evidence. This paper is quite related to our study of the performances of the ABC approximation to the Bayes

Read more »