{"id":5996,"date":"2011-04-24T01:17:50","date_gmt":"2011-04-23T16:17:50","guid":{"rendered":"http:\/\/haakondahl.com\/blog\/?p=392"},"modified":"2011-04-24T01:17:50","modified_gmt":"2011-04-23T16:17:50","slug":"using-r-from-an-sql-perspective","status":"publish","type":"post","link":"https:\/\/balldiamondball.com\/blog\/using-r-from-an-sql-perspective\/","title":{"rendered":"Using R from an SQL perspective"},"content":{"rendered":"<p>Oh, man. \u00a0Some day, I will learn to use<a href=\"http:\/\/www.r-project.org\/\" target=\"_blank\" rel=\"noopener\"> R<\/a>. \u00a0And on that day, I will plug it into live data using <a href=\"http:\/\/www.r-bloggers.com\/make-r-speak-sql-with-sqldf\/\" target=\"_blank\" rel=\"noopener\">sqldf<\/a>. \u00a0And there will be great rejoicing.<\/p>\n<p>And then I can do this:<\/p>\n<div style=\"width: 460px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\" \" title=\"Who cares what it is?  It takes three lines of code, including the #include!\" src=\"http:\/\/3.bp.blogspot.com\/_FsLa1cMTCWU\/TDHjxuwZMBI\/AAAAAAAAANY\/Fha5ydnfyeY\/s1600\/age_histogram.png\" alt=\"Stupendous picture of data.\" width=\"450\" height=\"450\" \/><p class=\"wp-caption-text\">library(ggplot2)<br \/>  DF=sqldf(&#039;select age from titanic3 where age != &quot;NA&quot;&#039;)<br \/> qplot(DF$age,data=DF, geom=&quot;histogram&quot;)<\/p><\/div>\n<div class=\"pld-like-dislike-wrap pld-template-1\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"https:\/\/balldiamondball.com\/blog\/wp-login.php\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"5996\" data-trigger-type=\"like\" data-restriction=\"user\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-up\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"https:\/\/balldiamondball.com\/blog\/wp-login.php\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"\" data-post-id=\"5996\" data-trigger-type=\"dislike\" data-restriction=\"user\" data-already-liked=\"0\">\r\n                        <i class=\"fas fa-thumbs-down\"><\/i>\r\n                <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Oh, man. \u00a0Some day, I will learn to use<a href=\"http:\/\/www.r-project.org\/\" target=\"_blank\" rel=\"noopener\"> R<\/a>. \u00a0And on that day, I will plug it into live data using <a href=\"http:\/\/www.r-bloggers.com\/make-r-speak-sql-with-sqldf\/\" target=\"_blank\" rel=\"noopener\">sqldf<\/a>. \u00a0And there will be great rejoicing.<\/p>\n<p>And then I can do this:<\/p>\n<\/p>\n<p> <a href=\"https:\/\/balldiamondball.com\/blog\/wp-login.php\" class=\"pld-like-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"5996\" data-trigger-type=\"like\" data-restriction=\"user\" data-already-liked=\"0\"> <i class=\"fas fa-thumbs-up\"><\/i> <\/a> <a href=\"https:\/\/balldiamondball.com\/blog\/wp-login.php\" class=\"pld-dislike-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"5996\" data-trigger-type=\"dislike\" data-restriction=\"user\" data-already-liked=\"0\"> <i class=\"fas fa-thumbs-down\"><\/i> <\/a><\/p>\n","protected":false},"author":34128,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5996","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/posts\/5996","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/users\/34128"}],"replies":[{"embeddable":true,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/comments?post=5996"}],"version-history":[{"count":0,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/posts\/5996\/revisions"}],"wp:attachment":[{"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/media?parent=5996"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/categories?post=5996"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/balldiamondball.com\/blog\/wp-json\/wp\/v2\/tags?post=5996"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}