search for: sqmi

Displaying 2 results from an estimated 2 matches for "sqmi".

Did you mean: semi
2009 Dec 01
3
paste name in for loop?
...e subsets of grouped data (by area size), and use the area size as part of the output name. The code below works for area (xout) 1 and 50, the other files are given NA for an area. A simple example: xout <- c(1,5,10,25,50,100) for(i in xout) { print(paste("Areal_Ppt_",xout[i],"sqmi.txt", sep="")) } [1] "Areal_Ppt_1sqmi.txt" [1] "Areal_Ppt_50sqmi.txt" [1] "Areal_Ppt_NAsqmi.txt" [1] "Areal_Ppt_NAsqmi.txt" [1] "Areal_Ppt_NAsqmi.txt" [1] "Areal_Ppt_NAsqmi.txt" The actual code and partial dataset are below...
2011 Feb 02
2
Efficient way to determine if a data frame has missing observations
...loyment. The problem I have is that some cities lack observations for some of the characteristics and I'd like a quick way to determine which cities have missing data. For example: city<-c("A","A","A","B","B","C") var<-c("sqmi","pop","emp","pop","emp","pop") value<-c(10,100,40,30,10,20) df<-data.frame(city,var,value) In this data frame, city A has complete data for the three variables, while city B is missing land area, and city C only has population data. In...