using-rstudio-with-gin.html 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. <!DOCTYPE html>
  2. <html lang="" xml:lang="">
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <title>4 Using Rstudio with GIN | dealing with gin</title>
  7. <meta name="description" content="4 Using Rstudio with GIN | dealing with gin" />
  8. <meta name="generator" content="bookdown 0.17 and GitBook 2.6.7" />
  9. <meta property="og:title" content="4 Using Rstudio with GIN | dealing with gin" />
  10. <meta property="og:type" content="book" />
  11. <meta name="twitter:card" content="summary" />
  12. <meta name="twitter:title" content="4 Using Rstudio with GIN | dealing with gin" />
  13. <meta name="viewport" content="width=device-width, initial-scale=1" />
  14. <meta name="apple-mobile-web-app-capable" content="yes" />
  15. <meta name="apple-mobile-web-app-status-bar-style" content="black" />
  16. <link rel="prev" href="using-application-made-for-git.html"/>
  17. <script src="libs/jquery-2.2.3/jquery.min.js"></script>
  18. <link href="libs/gitbook-2.6.7/css/style.css" rel="stylesheet" />
  19. <link href="libs/gitbook-2.6.7/css/plugin-table.css" rel="stylesheet" />
  20. <link href="libs/gitbook-2.6.7/css/plugin-bookdown.css" rel="stylesheet" />
  21. <link href="libs/gitbook-2.6.7/css/plugin-highlight.css" rel="stylesheet" />
  22. <link href="libs/gitbook-2.6.7/css/plugin-search.css" rel="stylesheet" />
  23. <link href="libs/gitbook-2.6.7/css/plugin-fontsettings.css" rel="stylesheet" />
  24. <link href="libs/gitbook-2.6.7/css/plugin-clipboard.css" rel="stylesheet" />
  25. </head>
  26. <body>
  27. <div class="book without-animation with-summary font-size-2 font-family-1" data-basepath=".">
  28. <div class="book-summary">
  29. <nav role="navigation">
  30. <ul class="summary">
  31. <li class="chapter" data-level="1" data-path="index.html"><a href="index.html"><i class="fa fa-check"></i><b>1</b> Dealing with Gin</a><ul>
  32. <li class="chapter" data-level="1.1" data-path="index.html"><a href="index.html#play-with-sandbox"><i class="fa fa-check"></i><b>1.1</b> Play with Sandbox</a></li>
  33. </ul></li>
  34. <li class="chapter" data-level="2" data-path="browsing.html"><a href="browsing.html"><i class="fa fa-check"></i><b>2</b> Browsing</a><ul>
  35. <li class="chapter" data-level="2.1" data-path="browsing.html"><a href="browsing.html#cannot-see-a-repository"><i class="fa fa-check"></i><b>2.1</b> Cannot see a repository?</a><ul>
  36. <li class="chapter" data-level="2.1.1" data-path="browsing.html"><a href="browsing.html#sign-in-to-gin"><i class="fa fa-check"></i><b>2.1.1</b> Sign in to Gin</a></li>
  37. <li class="chapter" data-level="2.1.2" data-path="browsing.html"><a href="browsing.html#check-that-the-repository-exists"><i class="fa fa-check"></i><b>2.1.2</b> Check that the repository exists</a></li>
  38. <li class="chapter" data-level="2.1.3" data-path="browsing.html"><a href="browsing.html#make-sure-you-have-access-to-the-repository"><i class="fa fa-check"></i><b>2.1.3</b> Make sure you have access to the repository</a></li>
  39. </ul></li>
  40. <li class="chapter" data-level="2.2" data-path="browsing.html"><a href="browsing.html#dashboard-how-to-use"><i class="fa fa-check"></i><b>2.2</b> Dashboard: how to use</a><ul>
  41. <li class="chapter" data-level="2.2.1" data-path="browsing.html"><a href="browsing.html#activity"><i class="fa fa-check"></i><b>2.2.1</b> Activity</a></li>
  42. <li class="chapter" data-level="2.2.2" data-path="browsing.html"><a href="browsing.html#collaborative-repositories"><i class="fa fa-check"></i><b>2.2.2</b> Collaborative repositories</a></li>
  43. <li class="chapter" data-level="2.2.3" data-path="browsing.html"><a href="browsing.html#private-repositories"><i class="fa fa-check"></i><b>2.2.3</b> Private repositories</a></li>
  44. </ul></li>
  45. <li class="chapter" data-level="2.3" data-path="browsing.html"><a href="browsing.html#browsing-a-repository"><i class="fa fa-check"></i><b>2.3</b> Browsing a repository</a><ul>
  46. <li class="chapter" data-level="2.3.1" data-path="browsing.html"><a href="browsing.html#overview-of-the-repository"><i class="fa fa-check"></i><b>2.3.1</b> Overview of the repository</a></li>
  47. <li class="chapter" data-level="2.3.2" data-path="browsing.html"><a href="browsing.html#browsing-files"><i class="fa fa-check"></i><b>2.3.2</b> Browsing files</a></li>
  48. </ul></li>
  49. <li class="chapter" data-level="2.4" data-path="browsing.html"><a href="browsing.html#downloading-files"><i class="fa fa-check"></i><b>2.4</b> Downloading files</a><ul>
  50. <li class="chapter" data-level="2.4.1" data-path="browsing.html"><a href="browsing.html#download-button"><i class="fa fa-check"></i><b>2.4.1</b> Download button</a></li>
  51. </ul></li>
  52. <li class="chapter" data-level="2.5" data-path="browsing.html"><a href="browsing.html#uploading-files"><i class="fa fa-check"></i><b>2.5</b> Uploading files</a><ul>
  53. <li class="chapter" data-level="2.5.1" data-path="browsing.html"><a href="browsing.html#location-of-the-buttons"><i class="fa fa-check"></i><b>2.5.1</b> Location of the buttons</a></li>
  54. <li class="chapter" data-level="2.5.2" data-path="browsing.html"><a href="browsing.html#common-features-for-file-upload"><i class="fa fa-check"></i><b>2.5.2</b> Common features for file-upload</a></li>
  55. <li class="chapter" data-level="2.5.3" data-path="browsing.html"><a href="browsing.html#uploading-a-set-of-files"><i class="fa fa-check"></i><b>2.5.3</b> Uploading a set of files</a></li>
  56. <li class="chapter" data-level="2.5.4" data-path="browsing.html"><a href="browsing.html#create-a-new-text-file"><i class="fa fa-check"></i><b>2.5.4</b> Create a new (text) file</a></li>
  57. <li class="chapter" data-level="2.5.5" data-path="browsing.html"><a href="browsing.html#edit-a-text-file"><i class="fa fa-check"></i><b>2.5.5</b> Edit a (text) file</a></li>
  58. </ul></li>
  59. </ul></li>
  60. <li class="chapter" data-level="3" data-path="using-application-made-for-git.html"><a href="using-application-made-for-git.html"><i class="fa fa-check"></i><b>3</b> Using application made for git</a></li>
  61. <li class="chapter" data-level="4" data-path="using-rstudio-with-gin.html"><a href="using-rstudio-with-gin.html"><i class="fa fa-check"></i><b>4</b> Using Rstudio with GIN</a></li>
  62. </ul>
  63. </nav>
  64. </div>
  65. <div class="book-body">
  66. <div class="body-inner">
  67. <div class="book-header" role="navigation">
  68. <h1>
  69. <i class="fa fa-circle-o-notch fa-spin"></i><a href="./">dealing with gin</a>
  70. </h1>
  71. </div>
  72. <div class="page-wrapper" tabindex="-1" role="main">
  73. <div class="page-inner">
  74. <section class="normal" id="section-">
  75. <div id="using-rstudio-with-gin" class="section level1">
  76. <h1><span class="header-section-number">4</span> Using Rstudio with GIN</h1>
  77. <p>Rstudio is a very nice application that was created to write and run R code. It now also has the possibilities to run python code and create reproducible reports in Rmarkdown (there are also specific tools to deal with citations in these reports). It also has git functionalities, allowing to <code>commit</code> (save a new version of your repository locally), <code>pull</code>(download changes existant on the server but absent of your local folder) and <code>push</code> (save all new versions present locally to the server version).</p>
  78. <p>You need first to make sure git is installed and found by Rstudio: go the menu <code>tools &gt; global options &gt; git</code> browse to the git.exe if Rstudio did not find it automatically (a git.exe is installed together with the gin-cli, but you can also install another via <a href="https://git-scm.com/downloads" class="uri">https://git-scm.com/downloads</a>. Find a walkthrough on how to set up ssh here: <a href="https://happygitwithr.com/ssh-keys.html" class="uri">https://happygitwithr.com/ssh-keys.html</a>. What you are asked to do on github will be done on GIN (<a href="https://gin.g-node.org/user/settings/ssh" class="uri">https://gin.g-node.org/user/settings/ssh</a>).</p>
  79. <p>You can now download new repositories using <code>file &gt; new project... &gt;&gt;version control &gt;&gt; git</code> insert the ssh link you get on the gin repository page (for this repo <code>git@gin.g-node.org:/larkumlab/Dealing_with_Gin.git</code>) and decide the folder name and where to save it on your machine. I put all my repositories in a special <code>gin</code> folder in my document folder, but this is up to you to organise your files.</p>
  80. <p>You can then make changes, on the right part of the Rstudio window, you can access a <code>git</code> tab, where changed files are listed. You can then use the buttons of the tab to commit changes, pull, or push commits to GIN. Git advices:</p>
  81. <ul>
  82. <li>make small commits</li>
  83. <li>give commits a meaningfull comment which will allow you to spot changes easily in the history tab</li>
  84. <li>if you are working on different machines, do not forget to pull changes when you start working, and push before you go.</li>
  85. </ul>
  86. </div>
  87. </section>
  88. </div>
  89. </div>
  90. </div>
  91. <a href="using-application-made-for-git.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page"><i class="fa fa-angle-left"></i></a>
  92. </div>
  93. </div>
  94. <script src="libs/gitbook-2.6.7/js/app.min.js"></script>
  95. <script src="libs/gitbook-2.6.7/js/lunr.js"></script>
  96. <script src="libs/gitbook-2.6.7/js/clipboard.min.js"></script>
  97. <script src="libs/gitbook-2.6.7/js/plugin-search.js"></script>
  98. <script src="libs/gitbook-2.6.7/js/plugin-sharing.js"></script>
  99. <script src="libs/gitbook-2.6.7/js/plugin-fontsettings.js"></script>
  100. <script src="libs/gitbook-2.6.7/js/plugin-bookdown.js"></script>
  101. <script src="libs/gitbook-2.6.7/js/jquery.highlight.js"></script>
  102. <script src="libs/gitbook-2.6.7/js/plugin-clipboard.js"></script>
  103. <script>
  104. gitbook.require(["gitbook"], function(gitbook) {
  105. gitbook.start({
  106. "sharing": {
  107. "github": false,
  108. "facebook": true,
  109. "twitter": true,
  110. "linkedin": false,
  111. "weibo": false,
  112. "instapaper": false,
  113. "vk": false,
  114. "all": ["facebook", "twitter", "linkedin", "weibo", "instapaper"]
  115. },
  116. "fontsettings": {
  117. "theme": "white",
  118. "family": "sans",
  119. "size": 2
  120. },
  121. "edit": {
  122. "link": null,
  123. "text": null
  124. },
  125. "history": {
  126. "link": null,
  127. "text": null
  128. },
  129. "view": {
  130. "link": null,
  131. "text": null
  132. },
  133. "download": null,
  134. "toc": {
  135. "collapse": "subsection"
  136. }
  137. });
  138. });
  139. </script>
  140. </body>
  141. </html>