Here is an example of a subset data in .csv files. There are three columns with no header. The first column represents the date/time and the second column is load [kw] and the third column is 1= weekday, 0 = weekends/ holiday.
9/9/2010 3:00   153.94  1
9/9/2010 3:15   148.46  1
I would like to program in R, so that it selects the first and second column within time ranges from 10:00 to 20:00 for all weekdays (when the third column is 1) within a month of September and do not know what's the best and most efficient way to code.
code dt <- read.csv("file", header = F, sep=",") 
#Select a column with weekday designation = 1, weekend or holiday = 0 
y <- data.frame(dt[,3]) 
#Select a column with timestamps and loads 
x <- data.frame(dt[,1:2]) 
t <- data.frame(dt[,1]) 
#convert timestamps into readable format 
s <- strptime("9/1/2010 0:00", format="%m/%d/%Y %H:%M") 
e <- strptime("9/30/2010 23:45", format="%m/%d/%Y %H:%M") 
range <- seq(s,e, by = "min") 
df <- data.frame(range)
 
     
     
    