I have a folder with several files. From each file I would like to select a cell (third row, 5th column) and bind them into one single column. Here's what I've got so far:
fnames1 <- scan(file.choose(), what = "character", quiet = TRUE)
print(fnames1)
for (i in fnames1)
{
date.time <- read.table(paste("...",i, sep = ""), skip = 2, nrows = 1)
timecol <- paste(date.time[, 5])
time <- cbind(timecol)}
but I'm still just getting several individual cells instead of one row with all the cells in it.
Any help will be very much appreciated!
EDIT: Answers to MrFlick: when prompted, I choose a file that contains the names of all the files in the folder from which I want to extract the cell I need. This is where fnames1 comes from. Time is a variable I'm creating to try to concatenate all the cells together (which is obviously not working). Adding that pasteafter the read table is the only way I've managed to get the loop working... I'm very new to R and I've been working with trial and error.