Joao,

I can't reproduce your results. Try:

str(A)

When I read in the data frame A, I see
> str(A)
'data.frame':    10 obs. of  4 variables:
 $ date: int  2006070100 2006070101 2006070102 2006070103 2006070104
2006070105 2006070106 2006070107 2006070108 2006070109
 $ my1 : int  1244 1221 1214 1194 1182 1178 1176 1173 1179 1246
 $ my2 : int  61 60 60 59 58 58 58 58 58 61
 $ my3 : int  62 60 60 59 58 58 58 58 59 62
> temp <- as.Date(A$date, format="%Y%m%d%H")
Error in as.Date.default(A$date, format = "%Y%m%d%H") :
    do not know how to convert 'A$date' to class "Date"

Which is a tip off that you need to force date to be a character, either at
read.table time or by doing:
> temp <- as.Date(as.character(A$date), format="%Y%m%d%H")
> temp
 [1] "2006-07-01" "2006-07-01" "2006-07-01" "2006-07-01" "2006-07-01"
 [6] "2006-07-01" "2006-07-01" "2006-07-01" "2006-07-01" "2006-07-01"

-- 
HTH,
Jim Porzak
Responsys, Inc.
San Francisco, CA
http://www.linkedin.com/in/jimporzak

On 10/10/07, Joao Santos <jcsantos@student.dei.uc.pt> wrote:
>
> Hello,
>
>
>
> I problem is in the format of the date, my time series is like this:
>
> 2006070100      1244     61        62
>
> 2006070101      1221     60        60
>
> 2006070102      1214     60        60
>
> 2006070103      1194     59        59
>
> 2006070104      1182     58        58
>
> 2006070105      1178     58        58
>
> 2006070106      1176     58        58
>
> 2006070107      1173     58        58
>
> 2006070108      1179     58        59
>
> 2006070109      1246     61        62
>
> ….
>
>
>
> When I attempt to format the time like this:
>
> A <- read.table("file", sep="\t", col.names=c("date", "my1", "my2",
> "my3"))
>
> temp <- as.Date(A$date, format="%Y%m%d%H")
>
> temp
>
> I get
>
>   [1] "4403-05-21" "4403-05-22" "4403-05-23" "4403-05-24" "4403-05-25"
>
>   [6] "4403-05-26" "4403-05-27" "4403-05-28" "4403-05-29" "4403-05-30"
>
>
>
> Another problem is in REGUL, I using the variables created in the
> extraction
> of the data but the regulation is not possible
>
>
>
> REGUL
>
> Ts.regul<-regul(A$date, y=A$my2, xmin=2006070100, n=800, units="hours",
> frequency=1,
>
>         deltat=1/3600, datemin=NULL, dateformat="m/d/Y", tol=NULL,
>
>         tol.type="both", methods="linear", rule=1, f=0, periodic=FALSE,
>
>         window=(2006080316 - 2006070100)/(800 - 1), split=100, specs=NULL)
>
>
>
> I think if the question is resolved the function REGUL will work to.
>
> Can someone help me? I new to this forum and in the utilisation of R.
>
>
>
>
>
> Thanks for the help in advance,
>
>
>
>             João Santos
>
>
>
>
>
>
>         [[alternative HTML version deleted]]
>
>
> ______________________________________________
> 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.
>
>

	[[alternative HTML version deleted]]

