{"id":336,"date":"2019-11-19T17:41:38","date_gmt":"2019-11-19T17:41:38","guid":{"rendered":"https:\/\/candicemorey.org\/?p=336"},"modified":"2019-11-19T17:41:40","modified_gmt":"2019-11-19T17:41:40","slug":"wrangling-messy-data-in-r-using-the-tidyverse","status":"publish","type":"post","link":"https:\/\/www.candicemorey.org\/?p=336","title":{"rendered":"Wrangling messy data in R using the tidyverse"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">When I was learning R, I found the biggest obstacle to be figuring out how to organize and format the data &#8211; how to go from raw, messy data to something I could enter into an analysis. This process has become much easier with the introduction of the <a href=\"https:\/\/www.tidyverse.org\">tidyverse<\/a> suite of packages. Over the past several months, I have been adopting the tidyverse syntax and applying it to my new scripts. Compared to my old routines, I&#8217;m finding this syntax much more transparent and readable, and I think it will make overcoming the obstacle of learning data wrangling in R much, much easier for new users.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you have been tempted to switch to R, but have been stymied by data wrangling, I hope you find this <a href=\"https:\/\/osf.io\/8d5qa\/\">notebook<\/a> I&#8217;ve written useful. To learn tidyverse, I took a large data set of output from the automated operation span created by Prof. Randy <a href=\"http:\/\/englelab.gatech.edu\">Engle&#8217;s lab<\/a> (collected by <a href=\"https:\/\/neuro-flash.com\/author\/jmall\/\">Dr. Jonathan Mall<\/a> when he worked with me at Rijksuniversiteit Groningen), and created data frames focusing on the processing responses and individual, trial-level memory responses. The program is designed to conveniently output summary scores. These trial level data are available, but need a lot of wrangling to be made useful for analysis. In the notebook, I describe what steps were needed to wrangle the raw data, and how to implement them.<\/p>\n","protected":false},"excerpt":{"rendered":"When I was learning R, I found the biggest obstacle to be figuring out how to organize and format the data &#8211; how to go from raw, messy data to something I could enter into an analysis. This process has become much easier with the introduction of the tidyverse suite&hellip;\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,23],"tags":[27,26,28,29],"class_list":["post-336","post","type-post","status-publish","format-standard","hentry","category-measurement","category-openness","tag-open-data","tag-scripting","tag-tidyverse","tag-transparency","odd"],"_links":{"self":[{"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=\/wp\/v2\/posts\/336","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=336"}],"version-history":[{"count":6,"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=\/wp\/v2\/posts\/336\/revisions"}],"predecessor-version":[{"id":342,"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=\/wp\/v2\/posts\/336\/revisions\/342"}],"wp:attachment":[{"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=336"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=336"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.candicemorey.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=336"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}