{"id":954,"date":"2012-02-27T11:55:38","date_gmt":"2012-02-27T16:55:38","guid":{"rendered":"http:\/\/www.nomad.priv.at\/researchblog\/?p=954"},"modified":"2012-02-27T11:55:38","modified_gmt":"2012-02-27T16:55:38","slug":"subsetting-made-easy","status":"publish","type":"post","link":"http:\/\/www.nomad.priv.at\/researchblog\/?p=954","title":{"rendered":"Subsetting made easy"},"content":{"rendered":"<p>Calculating characteristics such as median, mean,&#8230; of a subset of data is quite straightforward in R:<\/p>\n<p>For a data set containing results from several &#8220;models&#8221;, a subset for the model &#8220;base&#8221; is created by<\/p>\n<pre class=\"brush: r; title: ; notranslate\" title=\"\">\nbase_only &lt;- subset(all, all$model == &quot;base&quot;)\n<\/pre>\n<p>Then, the median of the variable &#8220;data&#8221; can be computed via<\/p>\n<pre class=\"brush: r; title: ; notranslate\" title=\"\">\nmedian(base_only$data)\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Calculating characteristics such as median, mean,&#8230; of a subset of data is quite straightforward in R: For a data set containing results from several &#8220;models&#8221;, a subset for the model &#8220;base&#8221; is created by base_only &lt;- subset(all, all$model == &quot;base&quot;) Then, the median of the variable &#8220;data&#8221; can be computed via median(base_only$data)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4],"tags":[140,511,346],"class_list":["post-954","post","type-post","status-publish","format-standard","hentry","category-r","category-research","tag-filter","tag-r","tag-subset"],"_links":{"self":[{"href":"http:\/\/www.nomad.priv.at\/researchblog\/index.php?rest_route=\/wp\/v2\/posts\/954","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.nomad.priv.at\/researchblog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.nomad.priv.at\/researchblog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.nomad.priv.at\/researchblog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.nomad.priv.at\/researchblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=954"}],"version-history":[{"count":0,"href":"http:\/\/www.nomad.priv.at\/researchblog\/index.php?rest_route=\/wp\/v2\/posts\/954\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.nomad.priv.at\/researchblog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=954"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.nomad.priv.at\/researchblog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=954"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.nomad.priv.at\/researchblog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=954"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}