learning code

December 8, 2022

learn by doing!

tips: if you usually clean your data in a certain language or platform, try using a new one!

stackoverflow

interactive tutorials! (e.g., datacamp)

become really good at googling - copy + paste the important part of your errors!

if you find the answer, challenge yourself to understand why that way works and your way doesn’t

R

getting scientific notation for your output?

    options(scipen=999)

fav package manager + some fav packages

pacman::p_load("dplyr", "ggplot2", "psych", install = TRUE)

want to knitr a nice html from your markdown? —-> bookdown

GitHub

GitHub is extremely useful for version control!!!! You create repositories for your projects which are basically like folders but they are collaborative (e.g., run one line of code to clone a repo, make edits, push it back to github so someone else can implement the edits) and track everything that’s ever been done.

Create an account

GitHub Documentation - getting started!

I highly recommend generating access tokens and ssh keys for ease of use. You can interact with git on the command line and manage your project with just a couple of lines of code.

One thing I live by - before you start making any edits in a repo, always run:

git status
Command Line

You can customize your terminal to your liking – see charles dobson’s post for a step-by-step tutorial

KEY COMMANDS:

cd stands for change directory. it’s how you will move in and out of different directories on your machine.

ls stands for list. you can run this in any directory and it will output its contents.
—> note: i like running ls -al which will give you a lot more information (e.g., permissions, date last modified, file size, etc.)

MORE TO COME (this page is a work in progress)

Python

I’m also learning python right now so this will serve more as a notes section. Coming soon.

Posted on:
December 8, 2022
Length:
2 minute read, 320 words
See Also: