Plusses and Arrows and Percents, oh my!. -
Do you continually substitute “%__%” for “+” when switching between data wrangling and data visualization? I’ve got just the solution for you!
Count myself as one of those ...
Adding labels to the end of lines indicating the last value -
Often, the value of the last data point in price series data is important to the viewer. Adding these yourself is always clumsy.
I considered creating my own geom to...
Your very own swiss chronograph -
I am always looking for a way to speed up processing in R before giving up and porting to C++.
To find bottlenecks, I used to put timing variables all over code with print statements. When I di...
Plot the data within a png for fun -
Just for fun, I took my avatar image and plotted the png data into a scatterplot.
It was relatively easy to do using the png package.
Don't call me anymore. -
I really don’t hate the paste function, it is actually quite useful when working with vectors. I just hate using it for simple string concatenation.
var = 4.345
paste0("The value is: ", var)
##  "...
Converting data.frames to different periods -
When I’m working with financial time series data, I usually use xts objects. I convert the data to a data.frame when I’m ready to plot. Sometimes, I find that I want to adjust the ... [Read more...]
...to ggplot some xts objects. -
The xts package is fantastic for time-series data manipulation. You can easily convert to and apply functions to different frequencies, merge with other time series vertically and horizontally, and...
Dot Dot Dot -
I have often found instances where I want to pass a list to a function that accepts multiple items though an ellipsis. If you pass the list, the function considers that one item.
Lists are handy structures to use ...