[R] missing observations
Mintewab Bezabih
Mintewab.Bezabih at economics.gu.se
Tue May 15 15:53:35 CEST 2012
Dear R users,
I have missing observations in my data that I remove in my analysis. I am able to run my codes alright but I want the non missing values to be correctly identified and therefore want to tag my id vector along in my results. Since the vector of ids has no role in the analysis, I dont know how to include it.
Here is my reprducable example:and my id is the vector I want to add to the analysis somehow so that my missing values are identified. I cannot use na.action function and that is why I have to drop my missing obesevations beforehand.
library(fields)
x <-1:20
y<- runif(20)
z<- c(11, 15, 17, 2, 18, 6, 7, NA, 12, 10,21, 25, 27, 12, 28, 16,
17, NA, 12, 10)
id <-1:20
mydataset<-data.frame(x, y, z)
temperature[complete.cases(mydataset),]
x<- temperature[, c(1)]
y<- temperature[, c(2)]
z<- temperature[, c(3)]
tpsfit <- Tps(cbind(x, y), z, scale.type="unscaled")
Many thanks as always.
Regards,
Mintewab
More information about the R-help
mailing list