Histogram Struggle

Hi! I'm new at this so I don't know if I've written this in the right place!
I'm trying to make a histogram of two means to compare them. I am comparing sex (Male and Female) and their average of a total. I would like to compare the two sexes average results, however I'm not sure how to do it. So far I have done

mean(SexF$Price Total)
mean(SexM$Price Total) #to collect the mean values

I then don't know how to insert these into a histogram, I tried to rename them using the following code (used the same code for Female, F) but when I put them into a histogram it says " 'x' must be numeric."
PriceTotalM<-mean(SexM$Price Total)

I also tried to build a histogram the code below, however nothing came from it.
hist(Result$PriceTotalM, PriceTotalF)

I'm wondering if anyone has advice on what I've done wrong or how to solve this?

You have definitely written this in (one of) the right place.

We probably should have a bit more information on exactly what you are doing. It is often easy to do something in many different ways in R.

Here are some suggestions:

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.