Publications by Slawa Rokicki
Loops revisited: How to rethink macros when using R
<p>Loading …</p> Related To leave a comment for the author, please follow the link and comment on their blog: R for Public Health. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on ...
419 sym
ggplot2: Cheatsheet for Scatterplots
<p>Loading …</p> Related To leave a comment for the author, please follow the link and comment on their blog: R for Public Health. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on ...
419 sym
ggplot2: Cheatsheet for Barplots
<p>Loading …</p> Related To leave a comment for the author, please follow the link and comment on their blog: R for Public Health. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on ...
419 sym
ggplot2: Cheatsheet for Visualizing Distributions
In the third and last of the ggplot series, this post will go over interesting ways to visualize the distribution of your data. I will make up some data, and make sure to set the seed. library(ggplot2) library(gridExtra) set.seed(10005) xvar <- c(rnorm(1500, mean = -1), rnorm(1500, mean = 1.5)) yvar <- c(rnorm(1500, mean = 1), r...
3214 sym R (3506 sym/6 pcs) 10 img
How to write and debug an R function
I’ve been asked on a few occasions what is the deal with R user-written functions. First of all, how does the syntax work? And second of all, why would you ever want to do this? In Stata, we don’t write functions; we execute built-in commands like browse or gen or logit. You can write an .ado file to make a new command but ...
9535 sym R (4199 sym/14 pcs)
3 ways that functions can improve your R code
Related To leave a comment for the author, please follow the link and comment on their blog: R for Public Health. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click her...
403 sym
Easy Clustered Standard Errors in R
Related To leave a comment for the author, please follow the link and comment on their blog: R for Public Health. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job. Want to share your content on R-bloggers? click her...
403 sym
Animations and GIFs using ggplot2
Tracing a regression lineDiverging density plotsHappy New Year plot Happy New Year everyone! For the last post of the year, I thought I’d have a little fun with the new animation package in R. It’s actually really easy to use. I recently had some fun with it when I presented my research at an electronic poster session, and had an animated mov...
1240 sym 6 img 1 tbl
Basics of Lists
Lists are a data type in R that are perhaps a bit daunting at first, but soon become amazingly useful. They are especially wonderful once you combine them with the powers of the apply() functions. This post will be part 1 of a two-part series on the uses of lists. In this post, we will discuss the basics – how to create lists, manipulate them,...
5589 sym
How to use lists in R
In the last post, I went over the basics of lists, including constructing, manipulating, and converting lists to other classes. Knowing the basics, in this post, we’ll use the apply() functions to see just how powerful working with lists can be. I’ve done two posts on apply() for dataframes and matrics, here and here, so give th...
4976 sym R (4484 sym/12 pcs) 1 tbl