Skip to content

Commit

Permalink
got data set up
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherrod Blankner authored and Sherrod Blankner committed Sep 18, 2016
1 parent 73fe5c6 commit f9db8a6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Plot1.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
df <- read.csv("/Users/mooncalf/Dropbox/skb/coursera/data/household_power_consumption.txt", sep=";")
#convert the Date and Time variables to Date/Time classes in R using the 𝚜𝚝𝚛𝚙𝚝𝚒𝚖𝚎() and 𝚊𝚜.𝙳𝚊𝚝𝚎()functions.

#df$Date <- strptime(x = as.character(df$Date), format = "%d/%m/%Y")
# temp column with date time
df$DateTimeTemp <- paste(df$Date,df$Time)
#convert to date time (for some reason required two steps to work)
df$DateTime <- strptime(x = as.character(df$DateTimeTemp), format = "%d/%m/%Y %H:%M:%S")
# drop extra columns
#drops <- c(Daf, select = c("Global_active_DateTime","power","Global_reactive_power","Voltage", "Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3"))

0 comments on commit f9db8a6

Please sign in to comment.