Displaying 1 result from an estimated 1 matches for "jundado".
Did you mean:
cuidado
2010 Feb 10
2
manipulate missing dates in a graphics a vector
...ve been trying to do a function below but it did not work. I really
appreciate any help
ordados <- function(datas,var)
{
ind <- !datas %in% var # find the missing date in var
miss <- datas[ind]
mat <- matrix(NA,length(miss),length(miss)) #insert NA in the missing date
mat[,1]<-miss
jundado <- rbind (mat,var)
jundado <- jundado[order(jundado[,1]),] # sort by dates
}
For instance:
If I have the vector below:
2009-12-01 26.8
2009-12-03 27.9
2009-12-04 25.6
2009-12-05 20.8
2009-12-08 20.8
I will need a result like this one
2009-12-01 26.8
2009-12-02...