Subsetting Data

#new_ds = new data set, old_ds=old dataset, var_1=variable 1 for selection criteria, var_2 = variable 2 for selection criteria, & = code for combining more than 1 criteria with both criteria should be fullfiled to be selected.

new_ds <- old_ds[var_1==1 & var_2==”Bandung”]