Flashcards
Getting Clean Data
Flashcards do conjunto (10)
- 1file.exists("directoryName")Checks if to see if the directory exists
- 2setwd("/Users)an absolute path for setting the working directory
- 3setwd("../data)relative path that moves up a directory
- 4dir.create("directoryName")creates a directory if it doesn't exist
- 5if !file.exists("data") {dir.create("data")}this line of code checks if a file exists, and creates one if it doesn't
- 6download.file(url, destfile = "", method = "curl")The function to download a function reproducibly
- 7listfiles("")shows you the files in the wd
- 8dateDownloaded <- date()Use this to record the date of downloaded file incase of updates or changes.
- 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 - 10read.xlsx()need to use sheetIndex =
header =
colIndex = 2:3
row Index = 1:4
Informações
- Descrição
- FlashCards sobre Getting Clean Data, criado por Noel Abastillas em 17-07-2017.
- Criado por
- Noel Abastillas
- Visualizações
- 0
- Avaliação