Publications by tylerrinker
microbenchmarking with R
I love to benchmark. Maybe I’m a bit weird but I love to bench everything in R. Recently I’ve had people raise accuracy challenges to the typical system.time and rbenchmark package approaches to benchmarking. I saw Hadley Wickham promoting the package microbenchmarking and decided to give it a whirl. This approach claims to improve...
1097 sym R (702 sym/2 pcs) 20 img
The Need for paste2 (part I)
This is Part I of a multi part blog on the paste2 function… I recently generated a new paste function that takes an unspecified list of equal length variables (a column) or multiple columns of a data frame and pastes them together. First let me thank Dason of Talk Stats for his help in this post that led to the creation of the paste2 funct...
2225 sym R (1129 sym/3 pcs) 16 img
The Need for paste2 (part II)
This is Part II of a multi part blog on the paste2 function… In my first post on the paste2 function I promised a proof of a few practical uses. The first example I have comes from psychometrics and comes out of a need left behind by ltm’s factor.score function. You can fit a survey data set with an IRT model and the ltm package will al...
1938 sym R (2801 sym/2 pcs) 16 img
Function to Generate a Random Data Set
Often I find myself needing data sets to try functions and code out on or for teaching purposes. I have a few stand-bys such as the mtcars and CO2 data sets in the base packages of R but sometimes I need a long format data set or a bunch of categorical or a bunch of numeric or repeated measures or I want it to have missing values to test the fu...
3398 sym R (5398 sym/4 pcs) 16 img
reshape (from base) Explained: Part I
This Post Will Explain the Basics of Wide to Long With base reshape (part I) Often your data set is in wide format and some sort of analysis or visualization requires putting the data set into long format. Hadely Wickham has a package for reshaping data called reshape2 that is pretty handy for quickly reshaping data with the melt and cast func...
6484 sym R (4452 sym/11 pcs) 16 img
reshape (from base) Explained: Part II
Part II Explains More Complex Wide to Long With base reshape In part I of this base reshape tutorial we went over the basics of reshaping data with reshape. We learned two rules that help us to be more efficient and effective in using this powerful base tool: RULE 1: Stack repeated measures/Replicate and stack everything else RULE 2: Naming...
9358 sym R (8509 sym/15 pcs) 20 img
igraph and structured text exploration
I am in the slow process of developing a package to bridge structured text formats (i.e. classroom transcripts) with the tons of great R packages that visualize and analyze quantitative data (If you care to play with a rough build of this package (qdap) see: https://github.com/trinker/qdap). One of the packages qdap will bridge to is igraph. A...
1824 sym R (1809 sym/6 pcs) 26 img
igraph and SNA: an amateur’s dabbling
I’ve been playing with the igraph package a bit lately (see previous post HERE) and wanted to approach a problem I once visited in the past. The basic gist of the problem is this: Students in a class are asked their top three favorite students to work with (rank order). After a social intervention this same question is posed again to students...
1309 sym R (1348 sym/1 pcs) 18 img
Hangman in R: A learning experience
I love when people take a sophisticated tool and use it to play video games. Take R for example. I first saw someone create a game for R at talk.stats.com. My friend Dason inspired me to more efficiently waste time in R with his version of minesweeper. The other day I had an immense amount of work to do and decided it was the perfect time to make...
2891 sym R (3915 sym/2 pcs) 6 img
Parallelization: Speed up Functions in a Package
Well I bought a new computer a month back (i7 8GB memory). Finally more than one core and a chance to try parallelization. I saw this blog post a while back and was intrigued and was further intriqued when I saw that plyr/reshape2 has some paralellization capabilities(LINK). Let me say up front this is my first experience so there may be better w...
3726 sym R (1292 sym/2 pcs) 6 img