{"id":193,"date":"2014-02-16T17:33:02","date_gmt":"2014-02-16T17:33:02","guid":{"rendered":"http:\/\/kktg.net\/sgr\/?page_id=193"},"modified":"2020-01-31T21:41:01","modified_gmt":"2020-02-01T02:41:01","slug":"sgr-data","status":"publish","type":"page","link":"https:\/\/kktg.net\/sgr\/sgr-code-2\/sgr-data\/","title":{"rendered":"SGR Data"},"content":{"rendered":"<p>The following are the datasets used in <em>A Survivor&#8217;s Guide to R<\/em>. Right click on a link to download or cut and paste the provided code to use directly in R.<\/p>\n<p><a href=\"\/\/www.kktg.net\/R\/Chapter2Data.txt\">Chapter 2 Data<\/a><\/p>\n<pre lang=\"r-script\" colla=\"-\" line=\"1\">\r\n\r\nmyData = read.delim(\"http:\/\/www.kktg.net\/R\/Chapter2Data.txt\", \r\n  header = TRUE,                       # Data has headers for var names\r\n  colClasses = c(\"character\",          # Set storage modes of variables\r\n    \"numeric\", \"numeric\", \"numeric\",   # This is just a convenience and  \r\n    \"numeric\", \"factor\", \"numeric\"))   #   could be adjusted afterwards\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"\/\/www.kktg.net\/R\/ozymandias.txt\">Ozymandias Data<\/a> (Chapter 8)<\/p>\n<pre lang=\"r-script\" colla=\"-\" line=\"1\">\r\n\r\nmyTxt = readLines(\"http:\/\/www.kktg.net\/R\/ozymandias.txt\") \r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"\/\/www.kktg.net\/R\/Chapter12Data.txt\">Chapter 12 Data<\/a><\/p>\n<pre lang=\"r-script\" colla=\"-\" line=\"1\">\r\n\r\nmyData = read.delim(file = \"http:\/\/www.kktg.net\/R\/Chapter12Data.txt\",\r\n  colClasses = c(\"character\", \"numeric\", \"numeric\", \"numeric\"), header = T)\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"\/\/www.kktg.net\/R\/calif-coords.csv\">California KML File<\/a> (Chapter 15)<\/p>\n<pre lang=\"r-script\" colla=\"-\" line=\"1\">\r\n\r\nCAshape = read.csv(\r\n  file = \"http:\/\/www.kktg.net\/R\/calif-coords.csv\", header = FALSE)\r\n\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><a href=\"\/\/www.kktg.net\/R\/Appendix2Data.txt\">Appendix B Data<\/a><\/p>\n<pre lang=\"r-script\" colla=\"-\" line=\"1\">\r\n\r\nmyData = read.delim(\"http:\/\/www.kktg.net\/R\/Appendix2Data.txt\",\r\n  colClasses =                         # Set column storage modes\r\n    c(\"character\", rep(NA, 8)),        #   1st col char, let R choose rest \r\n  header = TRUE,                       # Use column headers for variable names\r\n  row.names = 1)                       # Use first column for obs names\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The following are the datasets used in A Survivor&#8217;s Guide to R. Right click on a link to download or cut and paste the provided code to use directly in R. Chapter 2 Data myData = read.delim(&#8220;http:\/\/www.kktg.net\/R\/Chapter2Data.txt&#8221;, header = TRUE, # Data has headers for var names colClasses = c(&#8220;character&#8221;, # Set storage modes of [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":98,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-193","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/kktg.net\/sgr\/wp-json\/wp\/v2\/pages\/193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kktg.net\/sgr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kktg.net\/sgr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kktg.net\/sgr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kktg.net\/sgr\/wp-json\/wp\/v2\/comments?post=193"}],"version-history":[{"count":9,"href":"https:\/\/kktg.net\/sgr\/wp-json\/wp\/v2\/pages\/193\/revisions"}],"predecessor-version":[{"id":602,"href":"https:\/\/kktg.net\/sgr\/wp-json\/wp\/v2\/pages\/193\/revisions\/602"}],"up":[{"embeddable":true,"href":"https:\/\/kktg.net\/sgr\/wp-json\/wp\/v2\/pages\/98"}],"wp:attachment":[{"href":"https:\/\/kktg.net\/sgr\/wp-json\/wp\/v2\/media?parent=193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}