{"id":2093,"date":"2021-09-06T12:56:16","date_gmt":"2021-09-06T12:56:16","guid":{"rendered":"http:\/\/optimumsportsperformance.com\/blog\/?p=2093"},"modified":"2021-09-06T12:56:16","modified_gmt":"2021-09-06T12:56:16","slug":"tidyx-74-joins-in-sql-vs-local-r-environment","status":"publish","type":"post","link":"https:\/\/optimumsportsperformance.com\/blog\/tidyx-74-joins-in-sql-vs-local-r-environment\/","title":{"rendered":"TidyX 74: Joins in SQL vs Local R Environment"},"content":{"rendered":"<p>This week, Ellis Hughes and I continue our SQL in R series by discussing an important database task, joining two tables. Some of the things we cover:<\/p>\n<ul>\n<li>The different types of joins (LEFT JOIN, RIGHT JOIN, FULL JOIN, INNER JOIN, and ANTI JOIN)<\/li>\n<li>Doing a JOIN using SQL versus the local R environment and when you might choose one over the other<\/li>\n<li>Using the {microbenchmark} package to test which query is faster and performing optimally<\/li>\n<li>Finally, if you&#8217;d like more explicit info on creating JOINS in R, I wrote a blog post a little over a year ago that covers this topic in more detail, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/optimumsportsperformance.com\/blog\/r-tips-tricks-joining-data-sets\/\">CLICK HERE<\/a><\/span><\/strong>.<\/li>\n<\/ul>\n<p>To watch our screen cast, <strong><span style=\"color: #0000ff;\"><a style=\"color: #0000ff;\" href=\"https:\/\/www.youtube.com\/watch?v=i5DxFa-vThE\">CLICK HERE<\/a><\/span><\/strong>.<\/p>\n<p>To access our code, <span style=\"color: #0000ff;\"><strong><a style=\"color: #0000ff;\" href=\"https:\/\/github.com\/thebioengineer\/TidyX\/tree\/master\/TidyTuesday_Explained\/074-Databases_with_R_3\">CLICK HERE<\/a><\/strong><\/span>.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week, Ellis Hughes and I continue our SQL in R series by discussing an important database task, joining two tables. Some of the things we cover: The different types of joins (LEFT JOIN, RIGHT JOIN, FULL JOIN, INNER JOIN, and ANTI JOIN) Doing a JOIN using SQL versus the local R environment and when [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"class_list":["post-2093","post","type-post","status-publish","format-standard","hentry","category-tidyx-screen-cast"],"_links":{"self":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/comments?post=2093"}],"version-history":[{"count":1,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2093\/revisions"}],"predecessor-version":[{"id":2094,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/posts\/2093\/revisions\/2094"}],"wp:attachment":[{"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/media?parent=2093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/categories?post=2093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/optimumsportsperformance.com\/blog\/wp-json\/wp\/v2\/tags?post=2093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}