learning code

December 8, 2022

learn by doing!

there’s no better way to learn than having to…

tips: if you usually clean your data in a certain language or platform, try using a new one to add dimension to your skillset.

stackoverflow <3

interactive tutorials! (e.g., datacamp)

commit to completing a project using a specific language

become really good at googling - copy + paste 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

I use terminal for more than I should… I used to be intimidated but once I started working with more complex data and larger projects I had to learn.

One thing you can do is just open it up and start to hop around your machine (local or remote).

You can also 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, 391 words
See Also: