Errors with table() function

My code relying on my data frame is presently the following:

table(pois_data$Sex, pois_data$pH)

I receive an 'Object not found error' and when I change to the variable containing my imported data I receive:

Now I don't know how I can transform my data to make this work, I thought I should use:

pois_data$Sex <- as.factor(pois_data$Sex)

Although this has not worked either, does anyone have any expertise to better inform me?

As a guess, Sex is misspelled or missing from pois_data. Try

str(pois_data)

and see what it tells you.