Archive for December, 2015

Dec
04

Highlights of the new RStudio releases

The new release of R Studio got many improvement. As I read them, I was very so excited about the new functions. Here are highlights for me.

  • Data can be filtered, searched, and sorted
  • Execute R code from the Source Viewer using Ctrl+Enter
  • Keyboard shortcut quick reference(Windows/Linux: Alt+Shift+K)
  • Alt + Enter to run code whilte retaining cursor position
  • Ctrl+Shift+E to select within matching parents/braces
  • Ctrl+Shift+M for magrittr pipe operator (%>%)
  • Ctrl+Alt+Shift+E to expand selection to matching paren/brace
  • dev.new() now creates a new desktop graphics device if the RStudio device is already active
  • Default to current working directory for new project from existing directory
Dec
02

My Git learning notes

Git Basic

  • Git Help
    • $ git help
    • $ git help config
  • Setting up git
    • $ git config –global user.name “xxx”
    • $ git config –global user.email “xxx@xxx.com”
    • $ git config –global color.ui true
  • Starting a Repo
    • $ git init
    • Work flow:
      • create file aaa.txt
      • add aaa.txt to staging area
      • commit changes
      • modify aaa.txt
      • add aaa.txt to staging area
      • commit changes
    • $ git status : watch the status
    • $ git add aaa.txt : add the modified file into staging area
    • $ git commit -m “hahaha!”
    • $ git add aaa.txt bbb.txt : add two files to staging area
      $ git add –all
      $ git add *.txt : add all txt files in current directory
      $ git add docs/*.txt
      $ git add docs/
      $ git add “*.txt” : add all txt files in the whole project
    • $git commit -m “hahahaha!”
  • Timeline History
    • $ git log