# List all observations with a certain attribute

#### Amanda_UK

##### New Member
Hello dear Fellow-R-users!

I have huge datasets with US data and I'm struggling to sort them out.

My question is: How do I get to see a list of, for example, all observations from "Chicago"?
Data Set A has the variables "userid", "location_id", "location_lat", "hometown" etc. What command should I use, if I want to see a list of all observations from "Chicago", which is given under the variable "hometown" ? And what command should I use to just get the number of observations from Chicago?

Your help would be much appreciated. I've been trying to figure this out for a couple of hours...

Best,

Amanda

#### Jake

A[A$hometown=="Chicago",] Code: sum(A$hometown=="Chicago")