I have a statement like below.

my_num <- c("101","102","103","104","105","107","108","112","113","114","115")

"my_df" has 8,000 different STREPS in it.

I have a statement where I can select ONE item from data frame "my_df"
txhd_df <- prec_dist_df[ my_df$STREP=="101", c("COUNTY", "FIPS", "STSEN", "STREP", "PREC")]

I would like to make R compare and deliver only the STREPS that are in my_num.

A comparative SQL command WHERE STREP IN("101","102","103","104","105","107","108","112","113","114","115")

Thanks for any help,
Jim

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to