GoConqr has a new look! Let us know what you think.

Flashcards

Getting Clean Data

Noel Abastillas English 10 cards

Cards in this deck (10)

  1. 1file.exists("directoryName")Checks if to see if the directory exists
  2. 2setwd("/Users)an absolute path for setting the working directory
  3. 3setwd("../data)relative path that moves up a directory
  4. 4dir.create("directoryName")creates a directory if it doesn't exist
  5. 5if !file.exists("data") {dir.create("data")}this line of code checks if a file exists, and creates one if it doesn't
  6. 6download.file(url, destfile = "", method = "curl")The function to download a function reproducibly
  7. 7listfiles("")shows you the files in the wd
  8. 8dateDownloaded <- date()Use this to record the date of downloaded file incase of updates or changes.
  9. 9Parameters for download.file()file
    header = TRUE if there are headers
    row.name = TRUE if there are row names
    nrows = how many rows you want to read
    quote = You can tell if quoted values, resolves trouble if quotes are in file
    na.strings = the character that means it's a missing value
    skip = how many lines to skip before you start reading
  10. 10read.xlsx()need to use sheetIndex =
    header =
    colIndex = 2:3
    row Index = 1:4

Information

Description
Flashcards on Getting Clean Data, created by Noel Abastillas on 17/07/2017.
Created by
Noel Abastillas
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?