Articles by Mollie

Mapping GPS Tracks in R

December 13, 2012 | Mollie

This is an explanation of how I used R to combine all my GPS cycling tracks from my Garmin Forerunner 305.Converting to CSVYou can convert pretty much any GPS data to .csv by using GPSBabel. For importing directly from my Garmin, I used the comman... [Read more...]

Sorting Within Lattice Graphics in R

November 29, 2012 | Mollie

DefaultBy default, lattice sorts the observations by the axis values, starting at the bottom left.For example,library(lattice)colors = c("#1B9E77", "#D95F02", "#7570B3")dotplot(rownames(mtcars) ~ mpg, data = mtcars, col = colors[1], pch = 1)produc... [Read more...]

Palettes in R

October 25, 2012 | Mollie

In its simplest form, a palette in R is simply a vector of colors. This vector can be include the hex triplet or R color names.The default palette can be seen through palette(): __ palette("default") # you'll only need this line if you've previ... [Read more...]

Random Name Generator in R

October 11, 2012 | Mollie

Just for the heck of it, let's recreate my Reality TV Show Name Generator in R. This isn't really the sort of thing you'd normally do in R, but we can try out a bunch of different functions this way: random integers/sampling, concatenation, sorting, an... [Read more...]

Histogram + Density Plot Combo in R

September 27, 2012 | Mollie

Plotting a histogram using hist from the graphics package is pretty straightforward, but what if you want to view the density plot on top of the histogram? This combination of graphics can help us compare the distributions of groups.Let's use... [Read more...]

Descriptive Statistics of Groups in R

September 20, 2012 | Mollie

The sleep data set—provided by the datasets package—shows the effects of two different drugs on ten patients. Extra is the increase in hours of sleep; group is the drug given, 1 or 2; and ID is the patient ID, 1 to 10.I'll be using this data set to show how to ... [Read more...]

Word Clouds in R

September 13, 2012 | Mollie

Thanks to the wordcloud package, it's super easy to make a word cloud or tag cloud in R.In this case, the words have been counted already. If you are starting with plain text, you can use the text mining package tm to obtain the counts. Other blog... [Read more...]
1 2

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)