Displaying 1 result from an estimated 1 matches for "25cm2".
Did you mean:
252
2010 Dec 08
4
evaluating NAs in a dataframe
...alues in
demo$Area. Some of the values in demo$Area are "NA"
for (i in 1:nrow(demo)) {
if (demo$Area[i] > 0 && demo$Area[i] < 10) {Class[i]<-"S01"} ## 1-10 cm2
if (demo$Area[i] >= 10 && demo$Area[i] < 25) {Class[i] <- "S02"} ##
10-25cm2
if (demo$Area[i] >= 25 && demo$Area[i] < 50) {Class[i] <-"S03"} ## 25-50
cm2
if (demo$Area[i] >= 50 && demo$Area[i] < 100) {Class[i] <-"S04"} ## 50-100
cm2
if (demo$Area[i] >= 100 && demo$Area[i] < 200) {Class[i] <- "...