forked from rdpeng/ExData_Plotting1
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot1.R
More file actions
18 lines (14 loc) · 623 Bytes
/
Copy pathplot1.R
File metadata and controls
18 lines (14 loc) · 623 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
epc <- read.csv2("household_power_consumption.txt",
sep=";",
dec = ".",
na.strings=c("","?"),
colClasses = c("character", "character","numeric", "numeric", "numeric"
,"numeric", "numeric", "numeric", "numeric"))
epc[,"Date"] <- as.Date(epc[,"Date"],"%d/%m/%Y")
epc2 <- subset(epc, Date >= "2007-02-01" & Date <= "2007-02-02")
library(datasets)
with(epc2,
hist(Global_active_power, col = "red", xlab="Global Active Power (kilowatts)", main="Global Active Power")
)
dev.copy(png, file = "plot1.png")
dev.off()