{"id":2008,"date":"2011-11-30T12:50:12","date_gmt":"2011-11-30T17:50:12","guid":{"rendered":"http:\/\/blogs.law.harvard.edu\/kotrc\/?p=2008"},"modified":"2011-11-30T17:53:58","modified_gmt":"2011-11-30T22:53:58","slug":"rewriting-r-before-grd","status":"publish","type":"post","link":"https:\/\/archive.blogs.harvard.edu\/kotrc\/2011\/11\/30\/rewriting-r-before-grd\/","title":{"rendered":"Rewriting R before GRD"},"content":{"rendered":"<p>Got very frustrated at the end of the day yesterday\u2014I was trying to write up the code to get the stacked, 3D plot of characters related to linking mechanisms working. The code started to get very messy, because I needed to use the culled version of the matrix to construct the basic morphospace plot by PCO, but I needed access to the full matrix to show all of the relevant characters\u2014because some of them fell victim to the culling process. But since I&#8217;ve been referring to the matrix as &#8220;m&#8221; throughout the code, and variously loading the full or the culled matrix into that variable as needed, this was getting ugly when I needed access to both. I was wasting time and getting lost going back and forth in my code, trying to execute bits and fragments of it to do what I wanted to do.<\/p>\n<p>In short, I realized that it was no longer feasible to store this code as a long script broken into various sections dealing with the various aspects of analysis. The analysis will be so much easier and cleaner if I just repackage this into functions that I can call from a much shorter script, or directly from the command line.<\/p>\n<p>So, this meant a bit of extra unanticipated work, and I was a little slow getting started with this in the morning. I think it&#8217;s just a little daunting, because the code I&#8217;ve written for the analysis now tallies up to an impressive 28 pages, so it&#8217;s a fair bit of effort. But I just don&#8217;t trust myself to be able to add another 7 or 8 analysis steps (as I outlined yesterday) without completely derailing myself in the chaos of going back-and-forth in a completely linear, procedural script. Things will get screwed up unless I tidy this up.<\/p>\n<p>Spent most of the day working on this, and got about half way done. Didn&#8217;t get to my stated goal (as of yesterday) of spending the afternoon thinking\/reading\/writing&#8230; Bit by bit. I&#8217;ll get to it, tomorrow.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Got very frustrated at the end of the day yesterday\u2014I was trying to write up the code to get the stacked, 3D plot of characters related to linking mechanisms working. The code started to get very messy, because I needed to use the culled version of the matrix to construct the basic morphospace plot by [&hellip;]<\/p>\n","protected":false},"author":2222,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14607,13584],"tags":[16233,16364,19979],"class_list":["post-2008","post","type-post","status-publish","format-standard","hentry","category-research-journal","category-timekeeping","tag-morphospace","tag-r","tag-r-trickery"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/posts\/2008","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/users\/2222"}],"replies":[{"embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/comments?post=2008"}],"version-history":[{"count":3,"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/posts\/2008\/revisions"}],"predecessor-version":[{"id":2010,"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/posts\/2008\/revisions\/2010"}],"wp:attachment":[{"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/media?parent=2008"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/categories?post=2008"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/archive.blogs.harvard.edu\/kotrc\/wp-json\/wp\/v2\/tags?post=2008"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}