{"id":2903,"date":"2023-01-05T10:34:18","date_gmt":"2023-01-05T02:34:18","guid":{"rendered":"http:\/\/cnliutz.uicp.io\/?p=2903"},"modified":"2023-01-05T10:34:18","modified_gmt":"2023-01-05T02:34:18","slug":"r%e7%bb%98%e5%9b%be-%e6%9e%81%e5%9d%90%e6%a0%87%e3%80%81%e6%9d%a1%e5%bd%a2%e5%9b%be","status":"publish","type":"post","link":"http:\/\/g1n29wqq.ipyingshe.net:5347\/?p=2903","title":{"rendered":"R\u7ed8\u56fe-\u6781\u5750\u6807\u3001\u6761\u5f62\u56fe"},"content":{"rendered":"\n<pre class=\"wp-block-code\"><code># Library\r\nlibrary(fmsb)\r\n\r\n# Create data: note in High school for Jonathan:\r\ndata &lt;- as.data.frame(matrix( sample( 2:20 , 10 , replace=T) , ncol=10))\r\ncolnames(data) &lt;- c(\" \u6570\u5b66\" , \"english\" , \"biology\" , \"music\" , \"R-coding\", \"data-viz\" , \"french\" , \"physic\", \"statistic\", \"sport\" )\r\n\r\n# To use the fmsb package, I have to add 2 lines to the dataframe: the max and min of each topic to show on the plot!\r\ndata &lt;- rbind(rep(20,10) , rep(0,10) , data)\r\n\r\n# Check your data, it has to look like this!\r\nhead(data)\r\n\r\n# The default radar chart \r\nradarchart(data)\r\n\r\nlibrary(\"vcd\")\r\ndata(Arthritis, package=\"vcd\")\r\ntable(Arthritis$Improved)\r\n\r\nlibrary(ggplot2)\r\nggplot(Arthritis, aes(x=Improved)) + geom_bar()\r\nlabs(title=\"Simple Bar chart\",\r\n     x=\"Improvement\", y=\"Frequency\") \r\nggplot(Arthritis, aes(x=Improved)) + geom_bar() \r\nlabs(title=\"Horizontal Bar chart\", \r\n     x=\"Improvement\", \r\n     y=\"Frequency\") \r\ncoord_flip() <\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-2903","post","type-post","status-publish","format-standard","hentry","category-r"],"_links":{"self":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/2903","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2903"}],"version-history":[{"count":1,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/2903\/revisions"}],"predecessor-version":[{"id":2904,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=\/wp\/v2\/posts\/2903\/revisions\/2904"}],"wp:attachment":[{"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2903"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2903"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/g1n29wqq.ipyingshe.net:5347\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2903"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}