Subset spatial data

subset <- spatial_dataframe[spatial_dataframe$variable == “name”, ]