ems[3]
| house_info[,1]==problems[4])
or am I misunderstanding the question?
or perhaps %in% which probably does the job more elegantly but I forget the
syntax at the moment.
--- On Fri, 9/25/09, Jason Rupert wrote:
> From: Jason Rupert
> Subject: [R] grep
t;No water damage",..: 5 3 5 2 5 3 5 3 5 5 ...
$ house_number: num 276 594 591 376
229 428 248 237 534 517 ...
--- On Fri, 9/25/09, Jason Rupert wrote:
From: Jason Rupert
Subject: [R] grep or other complex string matching approach to
capture neces
You could use grep, but it's probably easier to use %in% (see also
is.element()), e.g.:
house_info[ house_info[,1] %in% c("Water damage", "water pipes damaged", "leaking
water"), ]
water_evaluation.water_evaluation_selection. house_number
6 water pipes damaged
Say I have the following data:
house_number<-floor(runif(100, 200, 600))
water_evaluation<-c("No water damage", "Water damage", "Water On", "Water off",
"water pipes damaged", "leaking water")
water_evaluation_selection<-floor(runif(100, 1,6))
house_info<-data.frame(water_evaluation[water_evalua
4 matches
Mail list logo