title: R: argument is not numeric or logical: returning NA
body: <p>I'm a new programmer. This is my code:</p>
  
  <pre><code>library(ggplot2)
  library(car)
  library(pastecs)
  library(psych)
  
  
  #loading in the data
  setwd("D:\\Meus Documentos\\Spider2099\\IC\\Analise de dados-Glandula\\Scripts R\\Histogram")
  hist&lt;-read.delim("adultos.txt", header=T)
  
  #setting up the histogram
  NormDist&lt;- ggplot(hist,aes(Adultos_1))+ theme(legend.position = "none")+ geom_histogram(aes(y=..density..), colour = "black", fill = "white")
  labs(x= "Log2(ratio H/L) Tecnical replicate 1", y= "Density")
  
  #fitting a normal curve
  NormDist+stat_function(fun=dnorm, args=list(mean=mean(hist$Adultos_1,na.rm=T),sd=sd(hist$Adultos_1,na.rm=T)),colour = "black", size=1)
  
  *****Warning message:
  In mean.default(hist$Adultos_1, na.rm = T) :
    argument is not numeric or logical: returning NA*****
  </code></pre>
  
  <p>How can I solve this trouble?</p>