-
Notifications
You must be signed in to change notification settings - Fork 0
/
Notes1
17 lines (17 loc) · 915 Bytes
/
Notes1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Lecture Notes: week1
1. getwd() and setwd(): In R for working with directories
2. setwd("./data") or setwd("../data") or setwd("/users/haroon...")
3. file.exists("directoryname"): to check if directory exists
4. dir.create("directoryname")
5. download.file(): function to download files from internet; has three parametrs i.e., url,destinationfile, method.
if url stands with https use "curl" as method name on mac
6. date() function is used to provide the data and time of download to the file
........................................
Reading files:
1. read.table() function is used to read files, parameters passed filename, sep,row.names,nrows,
2. read.csv() and read.csv2() also used
3. To get whole content part of xml file we use xmlSApply() function
4.xpathSApply(): to find content of specific tags
...........................
1. FIND COLUMN NAME= which(colnames(filename)=="column name")
WEEK2