Thanks a lot Rui and Arun. The methods work fine with the data I gave but when I tried the two methods with the following semi-colon separated data using sep = ";". Only the first 3 columnns are read properly rest of the columns are either empty or NAs.
********************************************************************************************** Remove this line Remove this line Remove this line Time;Actual Speed;Actual Direction;Temp;Press;Value1;Value2 ;[m/s];[°];°C;[hPa];[MWh];[MWh] 1/1/2012;0.0;0;#N/A;#N/A;0.0000;0.0000 1/2/2012;0.0;0;#N/A;#N/A;0.0000;0.0000 1/3/2012;0.0;0;#N/A;#N/A;1.5651;2.2112 1/4/2012;0.0;0;#N/A;#N/A;1.0000;2.0000 1/5/2012;0.0;0;#N/A;#N/A;3.2578;7.5455 *********************************************************************************************** I used the following code: dat1<-read.table("testInput.txt",sep=";",skip=3,fill=TRUE,header=TRUE) dat1<-dat1[-1,] row.names(dat1)<-1:nrow(dat1) Could you please let me know what is wrong with this approach? Thank you. Ravi -- View this message in context: http://r.789695.n4.nabble.com/Skipping-lines-and-incomplete-rows-tp4635830p4635952.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.