library("plot3D")
graphics.off()

setwd("D:/FILES")

# Esto es para ver los comentarios
data<-read.table("archivo.txt")
data<-data[[1]]  
dat1<-data[1:1000] 
plot(dat1,type="l") 

time.lag<-timeLag(dat1, "acf", method="first.zero", 
                  lag.max=NULL, do.plot = TRUE)

FN=estimateEmbeddingDim(dat1, 
                        number.points = length(dat1),
                        time.lag = 40, max.embedding.dim =100, 
                        threshold = 0.95,
                        max.relative.change = 0.1, do.plot = TRUE)

rvecs=buildTakens(dat1, embedding.dim=20, time.lag=1)