Re: [R] read and reshape time series table with empty items

2009-02-25 Thread Gabor Grothendieck
Try this: Lines <- '"Jahr";"Tag";"Jan";"Febr";"März";"April";"Mai";"Juni";"Juli";"Aug";"Sept";"Okt";"Nov";"Dez" 1978;1;"NA";"NA";"NA";0.0;5.5;0.0;11.8;0.0;2.4;6.4;0.0;0.0 1978;2;"NA";"NA";"NA";0.0;0.5;0.0;2.0;2.0;0.0;9.0;0.0;0.0 1978;3;"NA";"NA";"NA";0.3;0.0;3.0;3.2;0.4;0.0;24.7;0.0;0.0 1978;4;"N

[R] read and reshape time series table with empty items

2009-02-25 Thread Bastian Pöschl
Dear useR's, I have a problem to read data (daily precipitation). The data are formated in months by columns wich leads to empty items in months with less then 31 days. What i did was reading the file and try to reshape the object a<- read.table("nds.txt", header=TRUE, sep=";", dec = ".", na.stri