Message-ID: <1341898909347-4635952.post@n4.nabble.com>
Date: 2012-07-10T05:41:49Z
From: vioravis
Subject: Skipping lines and incomplete rows
In-Reply-To: <1341850477.91695.YahooMailNeo@web39406.mail.mud.yahoo.com>
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.