{"id":21602534,"url":"https://github.com/ff6347/r-maps","last_synced_at":"2025-03-18T13:24:47.821Z","repository":{"id":14621724,"uuid":"17339087","full_name":"ff6347/R-maps","owner":"ff6347","description":"fiddling with R and maps","archived":false,"fork":false,"pushed_at":"2016-08-19T11:43:38.000Z","size":488,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T18:35:22.152Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ff6347.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-02T14:20:09.000Z","updated_at":"2016-08-19T11:43:39.000Z","dependencies_parsed_at":"2022-08-31T09:12:36.619Z","dependency_job_id":null,"html_url":"https://github.com/ff6347/R-maps","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ff6347%2FR-maps","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ff6347%2FR-maps/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ff6347%2FR-maps/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ff6347%2FR-maps/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ff6347","download_url":"https://codeload.github.com/ff6347/R-maps/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244229086,"owners_count":20419563,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-24T19:13:43.822Z","updated_at":"2025-03-18T13:24:47.797Z","avatar_url":"https://github.com/ff6347.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"R-maps\n======\n\nfiddling with R and maps\n\n![](openpaths-map.png)\n![](map.png)\n![](output.png)\n\n\n##How 2 Setup R on MACOSX 10.9.2 \n\nThis is a short documentation what I did to setup a [R](http://cran.r-project.org) environment I like. Mostly for me not to forget what I did. The `$` at the beginning of the commandos is an indicator for the command prompt of the terminal or iTerm. Not a real command.\n\n###install homebrew  \n\nfollow [this guide](http://www.computersnyou.com/2025/2013/06/install-command-line-tools-in-osx-10-9-mavericks-how-to/) to install the XCode command line tools. Then go to to [brew.sh](http://brew.sh) and follow the installation instructions.  \n\n###install XQaurtz with homebrew cask  \n\n    $ brew tap phinze/cask\n    $ brew install brew-cask\n    $ brew cask install XQuartz\n\n###install iTerm2 with homebrew cask  \n\n    $ brew cask install iterm2   \n\n###install r by download  \n\n[go to here](http://mirrors.softliste.de/cran/) and follow the installation instructions\n\n###install r via homebrew (alternative. can create errors. not fully tested)  \n[found here](http://davidsimpson.me/2013/02/26/installing-r-on-os-x/)\n\n    brew update\n    brew tap homebrew/science\n    brew install gfortan\n    brew install r\n\n###Create rLibrary  \nIn iTerm enter:  \n\n    $ mkdir -p ~/rLibrary  \n\n###Check if it working  \n\nEnter the following command in iterm\nThis should open the REPL of r.\n\n- Set the libpath as shown below\n- Write q() to end it.  \n\nThis is what you should see:\n\n    $ r\n    R version 3.0.2 (2013-09-25) -- \"Frisbee Sailing\"\n    Copyright (C) 2013 The R Foundation for Statistical Computing\n    Platform: x86_64-apple-darwin10.8.0 (64-bit)\n    R ist freie Software und kommt OHNE JEGLICHE GARANTIE.\n    Sie sind eingeladen, es unter bestimmten Bedingungen weiter zu verbreiten.\n    Tippen Sie 'license()' or 'licence()' für Details dazu.\n    R ist ein Gemeinschaftsprojekt mit vielen Beitragenden.\n    Tippen Sie 'contributors()' für mehr Information und 'citation()',\n    um zu erfahren, wie R oder R packages in Publikationen zitiert werden können.\n    Tippen Sie 'demo()' für einige Demos, 'help()' für on-line Hilfe, oder\n    'help.start()' für eine HTML Browserschnittstelle zur Hilfe.\n    Tippen Sie 'q()', um R zu verlassen.\n\n    $ \u003e 2 + 4\n    $ \u003e .libPaths(\"Users/YourHomeFolder/rLibrary\")\n    $ \u003e q()  \n\n\n\n###Setup R Environment  \n\nStart the r REPL by writing:\nThe getwd() and setwd() commands give the the location your r console is running.  \n\n    $ r\n    $ \u003e getwd()\n    [1] \"/Users/YourHomeFolder/\"\n\n\ncreate a Environment file in your home directory.\n\n    $ echo \"R_LIBS=/Users/$HOME/rLibrary\" \u003e $HOME/.Renviron\n\n###install Sublime Text  \n\ngo to [here](http://www.sublimetext.com) and follow the instructions\n\n###install Sublime Package Manager  \n\ngo to [here](https://sublime.wbond.net/installation) and follow the instructions\n\n###install SublimeREPL via Package Manager  \n\nin the Sublime Text Command palette (shift + cmd + p) enter REPL\n\n###install Sublime Enhanced-R via Package Manager  \n\n- in the Sublime Text Command palette (shift + cmd + p) enter Enhanced. \n- open Sublime Text\u003ePreferences\u003ePackage Settings\u003eEnhanced R\u003eSettings Default\n- open Sublime Text\u003ePreferneces\u003ePackage Settings\u003eEnhanced R\u003eSettings User\n- copy the whole content from Default to user and change the osx.app settings to iterm  \n\nIt should look like this:  \n\n    \"osx\" : {\n        // R / R64 / Terminal / iTerm\n\n        \"App\" : \"iTerm\"\n        // path to Rscript binary\n        // \"Rscript\" : \"/usr/bin/Rscript\",\n    },\n\n\n###Finally write some code  \n\nOpen a iterm window and enter `r` to open the REPL \n\n    $ r\n\nCreate a new file in Sublime Text and save it as test.r  \nwrite into it:\n\n    vec = c(1,20,30,40,100,200,200)  \n    plot(vec, main=\"Hello World\")\n\nselect the whole code you want to execute and hit cmd + enter. This is the execute command from Enhanced-R and should send the selected code to iterm. iterm executes it and XQuartz should open an new window.  \n\n###install a r package  \n\nEnter into your testfile.  \n\n    install.packages(\"maps\")  \n    require(maps)\n    map('world')\n\nSelect it and hit cmd+enter.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fff6347%2Fr-maps","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fff6347%2Fr-maps","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fff6347%2Fr-maps/lists"}