Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate setup #244

Open
lindsayplatt opened this issue Jun 13, 2017 · 0 comments
Open

Automate setup #244

lindsayplatt opened this issue Jun 13, 2017 · 0 comments

Comments

@lindsayplatt
Copy link
Contributor

Automate setup process for using/building packages (and Intro to R?)

  • checkr ?
  • Ideal: send people a script that they can source, then instructors get an email (not necessarily realistic, but a nice goal)
# Check R version (3.3 or higher)
R.version
 
# Check RStudio version (1.0 or higher)
RStudio.Version()
 
# Check necessary packages installed
# devtools, roxygen2, testthat, knitr
# go to Packages tab
pkgs <- installed.packages()[,1]
sapply(c("devtools", "knitr", "testthat", "roxygen2"), 
       function(n,x){any(grepl(n,x))}, x=pkgs)
 
# RTools installed (not Macs)
# go to start button & type to see if it's installed
 
# Git and Git Bash are available
# go to start button & type to see if it's installed
 
# Restart R if you needed to install Git
 
# Setup SSH
  # Is SSH already setup?
  ls -al ~/.ssh
    # If so, is there a password setup? Get rid of it.
    ssh-keygen -p
  # If not, create a new SSH key
  ssh-keygen -t rsa -b 4096 -C "[email protected]"
    # Start the SSH key
    eval $(ssh-agent -s)
    # Add key to ssh-agent
    ssh-add ~/.ssh/id_rsa
 
# Add SSH to GitHub account
    # Settings >> SSH
    # Copy key to clipboard
    clip < ~/.ssh/id_rsa.pub
    # "Add SSH key", paste in body
    # Test that it's hooked up to GitHub properly
    ssh -T [email protected]
 
# Test SSH/git
    # Fork a GitHub repo
    # Copy address (SSH)
    # Go to RStudio & Create new proj w/ version CTRL
    # Paste address
    # Git Shell - add upstream
      # Copy Main repo address
        git add remote upstream <address>
        git remote -v
    # Pull from upstream
      git pull upstream master
    # Make a change & commit
      git push origin master
 
# Test that you can build a package
    # In the RStudio proj you started, try pressing “Build and Reload”
    # There could still be missing software if this doesn’t work
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant