title: ‘min’ not meaningful for factors
body: <pre><code>Exchange_rate &lt;-read.csv("Exchange.csv")
  
  str(Exchange_rate)
  
  summary(Exchange_rate)
  weekdays = data.frame(wdy =c("Thu","Fri","Mon","Tue","Wed"),x =runif(5),y =runif(5))
  
  summary(Exchange_rate$forecast)
  
  library(ggplot2)
  library(reshape2)
  library(gridExtra)
  
  min(as.character(as.numeric(Exchange_rate$YYYYMMDD)), na.rm=TRUE)
  
  normalize&lt;-function(x){return((x-min(x))/(max(x)-min(x)))}
  
  exchangeN&lt;-as.data.frame(lapply(Exchange_rate, normalize)) //ERROR AT THIS LINE
  
  summary(exchangeN)
  </code></pre>
  
  <p>I get the below error </p>
  
  <blockquote>
    <p>exchangeN&lt;-as.data.frame(lapply(Exchange_rate, normalize))Error in Summary.factor(c(115L, 117L, 120L, 122L, 124L, 125L, 126L, 130L,  : ‘min’ not meaningful for factors </p>
  </blockquote>
  
  <p>Why am I getting this and how do i fix this?</p>