Avoid Overplotting of Text in Ordination Diagram

June 25, 2012
By
Avoid Overplotting of Text in Ordination Diagram

Referring to a recent posting on r-sig-eco mailing list I'll add this example to theBioBucket:library(vegan)library(vegan)data(dune)sol <- metaMDS(dune) # use ordipointlabel -# here is an example where I added cex according to species frequencies:pl...

Read more »

Grouped means (or anything else…)

June 25, 2012
By
Grouped means (or anything else…)

An easy one today, but something that stumped me for a while* the first time I tried it out. How do you get a group mean (or other summary statistic) from R? Lets say you have a Y variable that represents repetitions for each of however many factors. You could subset the data by each

Read more »

Example 9.36: Levene’s test for equal variances

June 25, 2012
By
Example 9.36: Levene’s test for equal variances

The assumption of equal variances among the groups in analysis of variance is an expression of the assumption of homoscedasticity for linear models more generally. For ANOVA, this assumption can be tested via Levene's test. The test is a function of the residuals and means within each group, though various modifications are used, including the Brown-Forsythe...

Read more »

Euro 2012: Day 18

June 25, 2012
By
Euro 2012: Day 18

As promised. Looks like a Spain Germany final.

Read more »

How many ecologists were on ECOLOG in 1992?

June 25, 2012
By
How many ecologists were on ECOLOG in 1992?

Remember 1992? I had just turned 13 and was still a year away from highschool when my true descent into nerdom and the internet would begin. Back then it was with a local BBS (Bulletin Board System) run by a guy in a trailer park named Charlie and a 1200 baud modem on...

Read more »

Making Reproducible Research Enjoyable

June 25, 2012
By
Making Reproducible Research Enjoyable

Note: this is a contributed article for the ICSA Bulletin and the basic idea can be summarized in this picture. It is hard to convince people to think about reproducible research (RR). There are two parts of difficulties: (1) tools used to be for ex...

Read more »

Grid2Polygons

June 25, 2012
By
Grid2Polygons

I’d like to introduce you to the Grid2Polygons function; an R function for converting sp spatial objects from class SpatialGridDataFrame to SpatialPolygonsDataFrame. The significance of this conversion is that spatial polygons can be transformed to a different projection or datum with the spTransform function in package rgdal. Postscript files created with spatial polygons are reduced in size and...

Read more »

Hodgkin-Huxley model in R

June 24, 2012
By
Hodgkin-Huxley model in R

One of the great research papers of the 20th century celebrates its 60th anniversary in a few weeks time: A quantitative description of membrane current and its application to conduction and excitation in nerve by Alan Hodgkin and Andrew Huxley. Only a...

Read more »

Split-plot 1: How does a linear mixed model look like?

June 24, 2012
By
Split-plot 1: How does a linear mixed model look like?

I like statistics and I struggle with statistics. Often times I get frustrated when I don’t understand and I really struggled to make sense of Krushke’s Bayesian analysis of a split-plot, particularly because ‘it didn’t look like’ a split-plot to … Continue reading →

Read more »

useR 2012: main conference braindump

June 24, 2012
By
useR 2012: main conference braindump

I knew R was versatile, but DANG, people do a lot with it: > > … I don’t think anyone actually believes that R is designed to make *everyone* happy. For me, R does about 99% of the things I … Continue reading →

Read more »

reading shape files in R

June 24, 2012
By
reading shape files in R

If I would like to adjust a shape file I normally used the way over an excel file or a text file to get a table and to join this with an existing shape file. Due to the sp and rgdal packages in R you can manipulate shapefiles directly in R: now lets map the

Read more »

Optimal sorting using rpart

June 24, 2012
By
Optimal sorting using rpart

Some time ago I read a nice post Solving easy problems the hard way where linear regression is used to solve an interesting puzzle. Following the idea I used rpart to find optimal decision tree sorting five elements.It is well known that...

Read more »

Querying DBpedia from R

June 24, 2012
By

DBpedia is an extract of structured information from wikipedia. The structured data can be retrieved using an SQL-like query language for RDF called SPARQL. There is already an R package for this kind of queries named SPARQL.There is an S4 class Dbpedia part of my datamart package that aims to support the creation of predefined parameterized queries. Here is...

Read more »

Blog with R Markdown and tumblr: Part I

June 24, 2012
By
Blog with R Markdown and tumblr: Part I

I finally got a chance this weekend to settle on a way to include R Markdown into my blogging process. I needed to do this as my subsequent postings will involve more code chunks regarding Rook deployment and examples, and R Markdown formats and highlights code chunks like a boss! If you want to incorporate R code,...

Read more »

R 2.15.1 Available

June 24, 2012
By

Ubuntu packages for the latest release of R are now available on CRAN and RutteR PPA. If you have either repository installed, Ubuntu should have updated R automatically. If you do not have either repository isnallted, see the Installing R tab above....

Read more »

Highlights of the useR! 2012 – Review of the reviews

June 24, 2012
By
Highlights of the useR! 2012 – Review of the reviews

It’s gutted that I could not attend useR! 2012 after having a great time at useR!2011 at Warwick. However, a great active online community of useRs allows me to get lots of goods stuffs from the conference even though I did not attend physically. By keep following the #useR2012 and #rstats in Twitter and reading some great posts from R-bloggerRs on the

Read more »

Visualization in R with ggplot2 taught by Hadley Wickham at Statistics.com

June 24, 2012
By

Hadley Wickham, the creator of ggplot2, will present his course “Visualization in R with ggplot2,” online at Statistics.com, July 20 – Aug 17. Upcoming “R” courses, and others: Jun 22:  Smoothing with P-splines using R (taught by Brian Manly and Paul Eilers) Jun 29:  Data Mining in R (taught by Luis Torgo) Jul  6:  Intro to Resampling Methods (taught...

Read more »

Mexico City’s Metro Statistics

June 24, 2012
By
Mexico City’s Metro Statistics

I used R and ggplot2 to make a bubble map of Mexico City’s Metro passenger count from January to February 2012. The statistics are stunning, some stations for example Indios Verdes, reached 10 million passengers in jus three months. You can see the code below and get the data for the project here.The post Mexico City’s Metro Statistics...

Read more »

setting your working directory permanently in R

June 24, 2012
By

Most of us R users are using a special working directory for the daily work in R. But I was bothered in typing everytime in my command line prior using R. Also using this line at the first position in scripts was not pleasent enough. So how to get around this? There is a special

Read more »

Using twitteR to see, what german press secretary tweets about

June 24, 2012
By
Using twitteR to see, what german press secretary tweets about

Find the HTML-slides here, and the .Rmd-file that was used to generate here. How to deal with .Rmd-files, see here What this is about These are my first steps to play around with the interface from R to twitter, using the twitteR-package. We will load the latest 1500 (maximum the API allows) tweets from the

Read more »

Actuarial models with R, Meielisalp

June 23, 2012
By
Actuarial models with R, Meielisalp

I will be giving a short course in Switzerland next week, at the 6th R/Rmetrics Meielisalp Workshop & Summer School on Computational Finance and Financial Engineering organized by ETH Zürich, https://www.rmetrics.org/. The long...

Read more »

Framing investing as a decision-making process

June 23, 2012
By
Framing investing as a decision-making process

Brian Peterson and I had a chance to visit the University of Washington a couple of weeks ago at the behest of Doug Martin, where we gave a seminar covering various R packages we’ve written. Here are the slides we used. We also had quite a bit of time that we spent with Doug, Eric

Read more »

Retweets, Modified Tweets, vias: what’s in the SoMeLab dataset

June 23, 2012
By
Retweets, Modified Tweets, vias: what’s in the SoMeLab dataset

  Since October we have been collecting tweets related to the Occupy movement and so far we’ve picked up 64,298,104 tweets. In future posts we will give you some insight into our process, but today the question is, what is the difference between new style retweets, old style retweets and new emerging tags like MT?

Read more »

Handling large FASTA sequence datasets in R: Shuffle and retrieve "n" number of sequences of fixed length from the whole FASTA file and export them in a new FASTA file.

June 23, 2012
By

When you are working with large FASTA datasets is probable to find out that the sequences are in sort of a mixed quality (obviously, depending on your scientific question),I mean for example, imagine that you retrieve the whole collection of exons of a...

Read more »

The R-Podcast Screencast 2: Visualization with ggplot2

June 23, 2012
By

Here is the second screencast episode of the R-Podcast to accompany episode 8 of the R-Podcast: Visualization with ggplot2. In this screencast I demonstrate a real-time session of using ggplot2 to create boxplots for a visualization of hockey attendance in the NHL. The R code created in this screencast is available in our GitHub repository,

Read more »

Rcpp 0.9.11

June 22, 2012
By

Release 0.9.11 of Rcpp arrived on CRAN this morning and in Debian later today. This is a somewhat incremental release with a few internal improvements and few new features. One interesting new development has been contributed by John Chambers who i...

Read more »

Maps of changes in area boundaries, with R

June 22, 2012
By
Maps of changes in area boundaries, with R

Today a coworker needed some maps showing boundary changes. I used what I learned last week in the useR 2012 geospatial data course to make a few simple maps in R, overlaid on OpenStreetMap tiles. I’m posting my maps and … Continue reading →

Read more »

Updates to Old code

June 22, 2012
By
Updates to Old code

I notice from time to time that people download code from the drop box. The drop box lags  CRAN.  I’ve upload the newest versions to the drop box. In the future I will post new releases to the drop box before I submit to CRAN.

Read more »

R 2.15.1 includes performance improvements inspired by dataframe package

June 22, 2012
By

The latest update to open-source R, R 2.15.1, was released this morning. (You can grab sources now, and binary versions will hit the CRAN mirrors over the next couple of days.) In addition to several new features and bug fixes (including the new globalVariables function, which will be a boon to package developers), this update also includes some significant...

Read more »