{"id":359,"date":"2013-02-28T01:30:05","date_gmt":"2013-02-28T01:30:05","guid":{"rendered":"http:\/\/127.0.0.1\/~sfrey\/wordpress\/?p=359"},"modified":"2013-11-28T19:57:16","modified_gmt":"2013-11-28T19:57:16","slug":"nerd-post-installing-r-packages-remotely-and-without-priviliges-thereby-salvaging-xgrid","status":"publish","type":"post","link":"https:\/\/enfascination.com\/weblog\/post\/359","title":{"rendered":"Nerd post: Installing R packages remotely and without priviliges, thereby salvaging xgrid"},"content":{"rendered":"<p>I&#8217;m distributing jobs and had a bit of trouble with my scripts.  I don&#8217;t want to go to every computer on the cluster one-by-one to get the right scripts on them, and we&#8217;ve turned ssh off, and it&#8217;ll take going to each one to turn it on.  Plus what if a later script needs different libraries?  This pretty simple (*nix-\/OSX-only) snippet installs the package if you don&#8217;t already have it, and it works even if  xgrid is chugging without special privileges:<br \/>\n<code>if (!(\"urpackagehere\" %in% installed.packages())) {install.packages(\"urpackagehere\", repos = \"http:\/\/cran.r-project.org\", lib=\"\/tmp\/\")}<\/code><\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content --><!-- AddThis Related Posts generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>I&#8217;m distributing jobs and had a bit of trouble with my scripts. I don&#8217;t want to go to every computer on the cluster one-by-one to get the right scripts on them, and we&#8217;ve turned ssh off, and it&#8217;ll take going to each one to turn it on. Plus what if a later script needs different &hellip; <a href=\"https:\/\/enfascination.com\/weblog\/post\/359\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Nerd post: Installing R packages remotely and without priviliges, thereby salvaging xgrid<\/span><\/a><!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><!-- AddThis Related Posts generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wpupg_custom_link":[],"wpupg_custom_link_behaviour":[],"wpupg_custom_image":[],"wpupg_custom_image_id":[],"footnotes":""},"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/posts\/359"}],"collection":[{"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/comments?post=359"}],"version-history":[{"count":1,"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/posts\/359\/revisions"}],"predecessor-version":[{"id":654,"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/posts\/359\/revisions\/654"}],"wp:attachment":[{"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/media?parent=359"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/categories?post=359"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/enfascination.com\/weblog\/wp-json\/wp\/v2\/tags?post=359"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}