1931 search results for "Ggplot2"

To pre-pay or not to pre-pay for gas when renting a car?

February 20, 2013
By
To pre-pay or not to pre-pay for gas when renting a car?

One question we get asked a lot is whether it's worth it to pre-pay for the tank of gas when renting a car. At first, blush it seems like something you should never do. In the best case, you pay market rate for gas, and in the worst case, you pay for a tank of gas you never consume (what...

Read more »

Mapped: Twitter Languages in New York

February 20, 2013
By
Mapped: Twitter Languages in New York

Following the interest in our Twitter Tongues map for L

Read more »

10 R packages every data scientist should know about

February 18, 2013
By

The yhat blog lists 10 R packages they wish they'd known about earlier. Drew Conway calls them "10 reasons to always start your analysis in R". They're all very useful R packages that every data scientist should be aware of. They are: sqldf (for selecting from data frames using SQL) forecast (for easy forecasting of time series) plyr (data...

Read more »

#15 Alkali Silica Template

February 18, 2013
By
#15 Alkali Silica Template

Does what it says on the tin. DOWNLOAD THE CODE #------------------------------ #-------- INFORMATION --------- #------------------------------ # Plotting points from Hugh # Rallinson's "Using Geochemical # Data" book. Code compiled by # Darren J. Wilkinson, # Grant Inst. Earth Science # The University of Edinburgh # [email protected] #------------------------------ # -------- CONTROLS ---------- y.max = 16 x.min

Read more »

Veterinary Epidemiologic Research: Linear Regression

February 14, 2013
By
Veterinary Epidemiologic Research: Linear Regression

This post will describe linear regression as from the book Veterinary Epidemiologic Research, describing the examples provided with R. Regression analysis is used for modeling the relationship between a single variable Y (the outcome, or dependent variable) measured on a continuous or near-continuous scale and one or more predictor (independent or explanatory variable), X. If

Read more »

Stadium / home team effects in making field goals

February 13, 2013
By
Stadium / home team effects in making field goals

We take on a reader question of whether the stadium / home team matters for making a field goal. We pulled up the data on every field goal since 2002 (over 10,000) of them and plotted the probability of scoring as a function of the stadium in which the field goal was kicked. The post Stadium / home...

Read more »

#14 A New GGPLOT Template

February 13, 2013
By
#14 A New GGPLOT Template

  So the opts() has now been given the boot, and all the cool kids are using theme() to customise their ggplots. If you’re still on an old version of R then theme() will still work, but if you update (which you should) then it’ll stop working and you’ll have to edit all your code

Read more »

Sharing my work for “Advanced Methods III”

February 13, 2013
By
Sharing my work for “Advanced Methods III”

This semester I’m taking the live version of the Data Analysis class by Jeff Leek. His more popular version of the course is available through Coursera.  One of the things that Jeff promotes is reproducibility and sharing code. I share that tendency and thus created a Git repository for my homework and code for the class: lcollado753. I’m...

Read more »

R: Barplot with absolute and relative values

February 12, 2013
By
R: Barplot with absolute and relative values

In this short tutorial I will show how you can add the relative amount over the barplots, such that you have both, the absolute and relative Information in the plot. First, I create some artificial SNPs and TPMT-genotype.

Read more »

A Review of the R Graphics Cookbook

February 11, 2013
By
A Review of the R Graphics Cookbook

A common criticism of R, especially from data scientists who are new to R but proficient in multiple programming languages, is that R is “quirky” and annoying because there is almost always more than one way to do simple things. I usually counter that they are trying to say that R is “flexible” and “rich”, but by the time...

Read more »