Hi Uwe, yes you are right, but I just wanted to show the date format I use. The whole data is very huge (about 20000 rows).
Nevertheless I like first to find the missing dates/Times. Then put 0. I know they are some different approach to impute missing data, but for me is important to find a way to identify the missing gaps and then put the values (I think then it is not complicated to put other values instead of zero). Do you have any idea to find it out and put the values in ? Thanks in advance Hamid Uwe Ligges-3 wrote: > > > > Hamid wrote: >> Dear all, >> here my problem my be somone can help to solve this. >> >> I have tow timeseries from different stock market with different length >> (diff ca. 4000 ) >> Now I would to add the missing times of the one of this series with >> proper >> time (they are minute data) and set the value to 0 since I need to have >> the >> same length for my calculation. >> >> I tried to use the seq in R and merge but without success because of >> format >> of the date. >> My data of one vector i like to complete and extend to the length of the >> other vectors looks like: > > Well, this seems to be very complete, hence no idea what you want to > add, please specify a reproducible example. > > Uwe Ligges > > > >> Date;open;hight;low;close;Volume >> 02.04.2008 09:00;6.749,24;6.755,55;6.746,89;6.754,11;0 >> 02.04.2008 09:01;6.754,70;6.754,70;6.748,13;6.749,55;0 >> 02.04.2008 09:02;6.749,36;6.757,00;6.745,50;6.749,38;0 >> 02.04.2008 09:03;6.748,08;6.753,84;6.748,08;6.753,84;0 >> 02.04.2008 09:04;6.753,79;6.755,59;6.752,18;6.752,41;0 >> 02.04.2008 09:05;6.753,23;6.753,23;6.748,17;6.748,47;0 >> 02.04.2008 09:06;6.749,43;6.750,62;6.748,22;6.748,26;0 >> 02.04.2008 09:07;6.748,26;6.748,89;6.745,54;6.745,54;0 >> 02.04.2008 09:08;6.745,49;6.746,58;6.744,82;6.745,58;0 >> 02.04.2008 09:09;6.745,62;6.745,98;6.741,47;6.741,55;0 >> 02.04.2008 09:10;6.741,58;6.741,73;6.737,21;6.739,85;0 >> 02.04.2008 09:11;6.739,10;6.742,81;6.738,24;6.742,53;0 >> 02.04.2008 09:12;6.742,32;6.742,80;6.740,42;6.741,81;0 >> 02.04.2008 09:13;6.741,84;6.744,78;6.741,84;6.744,60;0 >> 02.04.2008 09:14;6.744,60;6.744,60;6.740,54;6.740,54;0 >> 02.04.2008 09:15;6.740,45;6.740,67;6.736,32;6.737,68;0 >> 02.04.2008 09:16;6.737,72;6.740,68;6.737,45;6.740,11;0 >> 02.04.2008 09:17;6.740,04;6.746,34;6.740,04;6.746,34;0 >> 02.04.2008 09:18;6.746,21;6.750,64;6.746,21;6.749,99;0 >> 02.04.2008 09:19;6.750,61;6.752,95;6.749,07;6.750,69;0 >> 02.04.2008 09:20;6.750,82;6.751,01;6.748,20;6.750,74;0 >> 02.04.2008 09:21;6.750,57;6.752,98;6.748,62;6.752,98;0 >> 02.04.2008 09:22;6.752,74;6.756,24;6.752,74;6.753,84;0 >> 02.04.2008 09:23;6.753,90;6.755,51;6.752,70;6.753,05;0 >> >> Thanks in advance for any help! >> H. > > ______________________________________________ > 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. > > -- View this message in context: http://n4.nabble.com/Need-help-to-complete-missing-value-Date-and-Time-in-Sp500-Data-tp962671p963080.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.