search for: var_unq

Displaying 1 result from an estimated 1 matches for "var_unq".

Did you mean: var_end
2011 Feb 02
2
Efficient way to determine if a data frame has missing observations
...to finding the missing observations has been to create a data frame with all combinations of 'city' and 'var', merge this onto the original data frame, and then extract the observations with missing data for 'value': city_unq<-c("A","B","C") var_unq<-c("sqmi","pop","emp") comb<-expand.grid(city=city_unq,var=var_unq) mrg<-merge(comb,df,by=c("city","var"),all=T) missing<-mrg[is.na(mrg$value),] This works, but on a large dataset it gets slow and I'm looking for a a more efficient...