Publications by steve

Rstudio starts to codefold markdown

16.09.2013

Rstudio is a great tool for working with R and R scripts. And Markdown is a great way to write even complex, reproducible documents in plain text. So they make a great combination. BUT: before when writing markdown in rstudio, you had to write “—-” after your headings to get it to codefold markdown headings, thusly: #my first-level heading ...

1401 sym

Conditioning and Grouping with Lattice Graphics

17.02.2014

Conditioning and grouping are two important concepts in graphing that allow us to rapidly refine our understanding of data under consideration. Conditioning, in particular, allows us to view relationships across “panels” with common scales. Each panel contains a plot whose data is “conditional” upon records drawn from the category that su...

11309 sym R (1851 sym/10 pcs) 24 img

Fortran and R – Speed Things Up

11.04.2014

If you are a newcomer to R then you are probably quite busy learning the semantics of the language as you experiment with the apply family of commands or come up to speed on the grouping and conditioning capabilities offered by lattice graphics. And, along the way, you might have heard that R has the ability to “link in” code written in other...

8253 sym R (5155 sym/14 pcs) 8 img

GeoCoding, R, and The Rolling Stones – Part 1

12.04.2014

Originally posted on Rolling Your Rs: In this article I discuss a general approach for Geocoding a location from within R, processing XML reports, and using R packages to create interactive maps. There are various ways to accomplish this, though using Google’s GeoCoding service is a good place to start. We’ll also talk a bit about the XML pa...

1407 sym 6 img

Floating table of contents for your html reports using knitr

27.04.2014

If you love knitr and rstudio and use them to produce long reports, you probably know that you can produce a table of contents in your html (and pdf) documents. In the newer rstudio (Version 0.98.801 or later) you do it by requesting a toc in the doc header, something like this. title: "cssTest" output: html_document: toc: yes But wo...

1153 sym

Dining in San Francisco – Let R Guide You

06.05.2014

I’m frequently asked by newcomers to R to provide an easy to follow generic set of instructions on how to download data, transform it, aggregate it, make graphs, and write it all up for publication in a high impact journal – all by the end of the day ! While such a request is somewhat understandable coming from a student it’s somewhat awkwa...

9370 sym R (12851 sym/14 pcs) 12 img

The apply command 101

15.05.2014

The goal of this blog entry is to introduce basic and essential information about the apply function. Even established R users get confused when considering this family of functions especially when observing how many of the them there are: apply, tapply, lapply, sapply, rapply, eapply, mapply. When I was new to R I was rarely satisfied with the ...

8835 sym R (7434 sym/20 pcs) 6 img

Bar charts with percentage labels but counts on the y axis

11.06.2014

Bar charts and histograms are easily to understand. I often write for non-specialist audiences so I tend to use them a lot. People like percentages too, so a bar chart with counts on the y axis but percentage labels is a useful thing to be able to produce. But how to do them in our graphics package of choice, ggplot? ggplot makes histograms by do...

1303 sym 2 img

module2 Day 3 htwtkids Rscript

20.02.2020

# ~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~ CRP 245 Module 2 Day 3 ~ # ~ Regression Analysis ~ # ~ Height and Weight of Kids ~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Data on Age, Weight, and Height of Children # # recorded for a group of school children. # # From Lewis and Taylor (1967). # In this example, the weights of school children are ...

19 sym R (9604 sym/63 pcs) 16 img

crp245-mod2-day-Rscript

12.02.2020

# ~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~ CRP 245 Module 2 Day 2 ~ # ~ Regression Diagnostics ~ # ~~~~~~~~~~~~~~~~~~~~~~~~~~ ################################################################## # Muscle Contraction in Alcoholics: # This dataset contains maximum voluntary contraction (MVC) of quadriceps muscle, age, # and height, of 41 male alcohol...

24 sym R (15955 sym/71 pcs) 31 img