{"id":164,"date":"2009-12-19T16:35:35","date_gmt":"2009-12-19T23:35:35","guid":{"rendered":"http:\/\/www.talyarkoni.org\/blog\/?p=164"},"modified":"2009-12-22T22:22:54","modified_gmt":"2009-12-23T05:22:54","slug":"got-r-get-social-science-for-r","status":"publish","type":"post","link":"https:\/\/talyarkoni.org\/blog\/2009\/12\/19\/got-r-get-social-science-for-r\/","title":{"rendered":"got R? get social science for R!"},"content":{"rendered":"<p><a href=\"http:\/\/www.drewconway.com\">Drew Conway<\/a> has a great list of <a href=\"http:\/\/www.drewconway.com\/zia\/?p=1614\">10 must-have R packages for social scientists<\/a>. If you&#8217;re a social scientist (or really, any kind of scientist) who doesn&#8217;t use <a href=\"http:\/\/www.r-project.org\/\">R<\/a>, now is a great time to dive in and learn; there are tons of tutorials and guides out there (my favorite is <a href=\"http:\/\/www.statmethods.net\/\">Quick-R<\/a>, which is incredibly useful incredibly often), and packages are available for just about any application you can think of. Best of all, R is completely free, and is available for <a href=\"http:\/\/cran.r-project.org\/\">just about every platform<\/a>. Admittedly, there&#8217;s a fairly steep learning curve if you&#8217;re used to GUI-based packages like SPSS (R&#8217;s syntax can be pretty idiosyncratic), but it&#8217;s totally worth the time investment, and once you&#8217;re comfortable with R you&#8217;ll never look back.<\/p>\n<p>Anyway, Drew&#8217;s list contains a number of packages I&#8217;ve found invaluable in my work, as well as several packages I haven&#8217;t used before and am pretty eager to try. I don&#8217;t have much to add to his excellent summaries, but I&#8217;ll gladly second the inclusion of<a href=\"http:\/\/had.co.nz\/ggplot2\/\"> <em>ggplot2<\/em><\/a> (the easiest way in the world to make beautiful graphs?) and <em>plyr<\/em> and <em>sqldf<\/em> (great for sanitizing, organizing, and manipulating large data sets, which are often a source of frustration in R). Most of the other packages I haven&#8217;t had any reason to use personally, though a few seem really cool, and worth finding an excuse to play around with (e.g., Statnet and igraph).<\/p>\n<p>Since Drew&#8217;s list focuses on packages useful to social scientists in general, I thought I&#8217;d mention a couple of others that I&#8217;ve found particularly useful for psychological applications. The most obvious one is <a href=\"http:\/\/www.personalitytheory.com\/revelle.html\">William Revelle<\/a>&#8216;s awesome <a href=\"http:\/\/personality-project.org\/r\/html\/00Index.html\">psych<\/a> package, which contains tons of useful functions for descriptive statistics, data reduction, simulation, and psychometrics. It&#8217;s saved me me tons of time validating and scoring personality measures, though it probably isn&#8217;t quite as useful if you don&#8217;t deal with individual difference measures regularly. Other packages I&#8217;ve found useful are <em>sem<\/em> for structural equation modeling (which interfaces nicely with <a href=\"http:\/\/www.graphviz.org\/\">GraphViz<\/a> to easily produce clean-looking path diagrams), <em>genalg <\/em>for genetic algorithms, <em>MASS<\/em> (mostly for sampling from multivariate distributions), <em>reshape<\/em> (similar functionality to plyr), and <em>car<\/em>, which contains a bunch of useful regression-related functions (e.g., for my dissertation, I needed to run SPSS-like repeated measures ANOVAs in R, which turns out to be a more difficult proposition than you&#8217;d imagine, but was handled by the Anova function in car). I&#8217;m sure there are others I&#8217;m forgetting, but those are the ones that I&#8217;ve relied on most heavily in recent work. No doubt there are tons of other packages out there that are handly for common psychology applications, so if there are any you use regularly, I&#8217;d love to hear about them in the comments!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Drew Conway has a great list of 10 must-have R packages for social scientists. If you&#8217;re a social scientist (or really, any kind of scientist) who doesn&#8217;t use R, now is a great time to dive in and learn; there are tons of tutorials and guides out there (my favorite is Quick-R, which is incredibly &hellip; <a href=\"https:\/\/talyarkoni.org\/blog\/2009\/12\/19\/got-r-get-social-science-for-r\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">got R? get social science for R!<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"footnotes":"","_jetpack_memberships_contains_paid_content":false,"jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[75,49],"tags":[79,703,76,78,702,698],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/pEZxN-2E","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/posts\/164"}],"collection":[{"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/comments?post=164"}],"version-history":[{"count":7,"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/posts\/164\/revisions"}],"predecessor-version":[{"id":168,"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/posts\/164\/revisions\/168"}],"wp:attachment":[{"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/media?parent=164"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/categories?post=164"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/talyarkoni.org\/blog\/wp-json\/wp\/v2\/tags?post=164"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}