We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
consumption<-read.table("household_power_consumption.txt",sep=";",header=TRUE,stringsAsFactors=F, na.strings="?") consumption$Date<-as.Date(consumption$Date,format='%d/%m/%Y') head(consumption$Date) consumption1<-subset(consumption,Date%in%as.Date(c("2007-02-01","2007-02-02"))) consumption1$DateTime=as.POSIXct(paste(consumption1$Date,consumption1$Time)) consumption1$Global_active_power<-as.numeric(consumption1$Global_active_power) png("plot1.png", width=480, height=480) hist(consumption1$Global_active_power,xlab="Global Active Power(kilowatts)",ylab="Frequency",main="Global Active Power",col="red") dev.off()
consumption<-read.table("household_power_consumption.txt",sep=";",header=TRUE,stringsAsFactors=F, na.strings="?") consumption$Date<-as.Date(consumption$Date,format='%d/%m/%Y') head(consumption$Date) consumption1<-subset(consumption,Date%in%as.Date(c("2007-02-01","2007-02-02"))) consumption1$DateTime=as.POSIXct(paste(consumption1$Date,consumption1$Time)) consumption1$Global_active_power<-as.numeric(consumption1$Global_active_power) DateTime<-consumption1$DateTime png("plot2.png", width=480, height=480) plot(x=DateTime,y=consumption1$Global_active_power,type="l",xlab="",ylab="Global Active Power (kilowatts)") dev.off()
consumption<-read.table("household_power_consumption.txt",sep=";",header=TRUE,stringsAsFactors=F, na.strings="?") consumption$Date<-as.Date(consumption$Date,format='%d/%m/%Y') head(consumption$Date) consumption1<-subset(consumption,Date%in%as.Date(c("2007-02-01","2007-02-02"))) consumption1$DateTime=as.POSIXct(paste(consumption1$Date,consumption1$Time)) consumption1$Global_active_power<-as.numeric(consumption1$Global_active_power) DateTime<-consumption1$DateTime plot(x=DateTime,y=consumption1$Sub_metering_1,xlab="",type="l",ylab="Energy sub metering") lines(x=DateTime,y=consumption1$Sub_metering_2,col="red") lines(x=DateTime,y=consumption1$Sub_metering_3,col="blue") legend("topright", col=c("black", "red", "blue"), lty=1, lwd=2,legend=c("Sub_metering_1", "Sub_metering_2", "Sub_metering_3"))
png("plot4.png", width=480, height=480) par(mfrow=c(2,2)) plot(x=DateTime,y=consumption1$Global_active_power,type="l",xlab="",ylab="Global Active Power (kilowatts)") plot(x=DateTime,y=consumption1$Voltage,type="l",xlab="datetime",ylab="Voltage") plot(x=DateTime,y=consumption1$Sub_metering_1,xlab="",type="l",ylab="Energy sub metering") lines(x=DateTime,y=consumption1$Sub_metering_2,col="red") lines(x=DateTime,y=consumption1$Sub_metering_3,col="blue") legend("topright", col=c("black", "red", "blue"), lty=1, lwd=2,legend=c("Sub_metering_1", "Sub_metering_2", "Sub_metering_3")) plot(x=DateTime,y=consumption1$Global_reactive_power,type="l",xlab="datetime",ylab="Global_reactive_power") dev.off()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: