April 14, 2014

The system function in R

Will run it's first argument on the terminal command line (Mac/Unix)

Windows: it doesn't run on the cygwin shell so my code won't work for you.

Strategy

"Both cases follow a similar process:

1. Extract a subset of the data for which it is easy to solve the problem.

2. Solve the problem by hand, checking results as you go.

3. Write a function that encapsulates the solution.

4. Use the appropriate plyr function to split up the original data, apply the function to each piece and join the pieces back together."

–(Split-Apply-Combine, H. Wickham)

How does commute type vary geographically?

1. Use Oregon data

2. Using dplyr, "by hand", explore commute type, how do I want to summarise it?

3. Write functions, that take a state, and download, extract, cut, read in and summarise.

4. Apply or loop, over all states.

5. Explore, then figure out how to present the results…