I am beginning to use R after a long stint with MATLAB and have come across a problem. I apologise in advance for the simplicity of this question.
Consider the following example:
This code specifies the pathname for each text file I would like to import into R. The text files contain 8760 rows and 12 or 11 column (i.e. the number of columns vary). I would like to import this data in a similar format as a cell array in MATLAB where each text file would correspond to a cell. I have attempted the following:
This works to a certain extent although I am unsure about how to use the data from here. I'm am hoping to eventually convert the data into a time series. Note: the data is temperature measurements measured at various heights where each column is a different height and each represents time.
Consider the following example:
Code:
TopFolder = "E:\\University"
SubFolder = list.files(TopFolder)
PathName = paste(TopFolder,SubFolder,"temp.txt",sep="\\")
Code:
temp = lapply(PathName, read.table)