creating data using rep()

The frequency with which my data is missing important information when it gets to R is a bit embarrassing. I’m sure as I learn what kind of information R needs I’ll get better at this but for the moment using functions like rep() to create variables like trial number or block has been super useful. Alison Smith has a great blog called Very Statisticious and her post about simulating data is super helpful.

Use map to read many csv files

Dipping my toes in purrr here and replicating options from a super useful blog post I found by ClausWilke How to use map() to read in and bind together several .csv files Option 1 The simplest option; use when your .csv files contain ID/participant and all live your working directory Get list of .csv files called files. The code below looks for files that have .csv as part of the filename in the the working directory

in purrr

September 6, 2018

I don’t like cats much

I don’t love cats. I am not a member of @RCatLadies. So the fact that Tidyverse packages for dealing with factors and functional programming have cat-related names (forcats and purrr) does not endear them to me. I knew there was a time when I would encounter an R problem that needed the power of for loops, so when I asked the Twittersphere whether there was an alternative (hopefully a tidyverse one) that would allow me to avoid loops a little longer, I was a bit disappointed to hear that it is the purrr package.

By Jen Richmond in purrr

September 5, 2018

lesser known stars of the tidyverse

Emily Robinson writes a great blog called www.hookedondata.org. She talked at the 2018 New York R conference recently and shared some of her favourite (less well known) stars of the Tidyverse. Here are her slides www.tiny.cc/nyrtalk and my notes… 1.use as_tibble() Tibble = modern dataframe. Use instead of printing your dataset to the console. as_tibble() will only print the first 10 rows and columns that fit on the screen.

dirty data

I have been doing lots of data wrangling recently and decided a needed a quick rundown of data cleaning in R. Here are notes on useful things I learned recently. Quick summaries class() will let you know whether you are working with a dataframe or not dim() gives you a little info about the dimensions of your data by telling you how many rows nd columns you have