[R] help with function filter

2008-06-09 Thread wilquin Minaya
Hi everybody I need to create a program using the function filter with this vector. MATDINAMIC$VELOCIDADFIN[1:1000] That´s why I want to identify when use the mean and the median because I have problems. I want to know if I am using correct this: filter(MATDINAMIC$VELOCIDADFIN[

[R] missing data

2008-06-09 Thread wilquin Minaya
hi I would like to know how I can complete those missing data from these programs: program number one DATOS2 <- sin(seq(1,20,0.1)) > DATOS2[103] <- NA > DATOS2[65] <- NA > DATOS2[134] <- NA this is the other one > data(pressure) > DATOS3 <- pressure > DATOS3[4,1] <- NA > DATO

[R] ayuda con la funcion filter

2008-06-09 Thread wilquin Minaya
Hola Necesito crea una funcion usando filter que en vez de sustituir los datos por los puntos de alrededor lo haga por la mediana. Puedo utilizar esta funcion de esta manera para utilizar la media y para utilizar la mediana filter(MATDINAMIC$VELOCIDADFIN[1:1000],rep(1/