Hi,

I'm trying to create a function for graphics in R, but when I apply it to my data.frame the name of each variable does not appear in the graphics, does anyone know how to help me?

I tried to use "xlab = substitute (x)", but it didn't work.

histograma<- function(x)

{(A<- max(x) - min(x)); (k<- sqrt(length(x))); (k<- ceiling(k)); (h<- A/k); (h<- round(h,2)); (int<- c(min(x) + seq(0,k+1,1)*h)); (resumo<- hist(x, breaks=int, include.lowest = F, right = F)); hist(x, breaks=int, col= "green", xlab= substitute(x), ylab="Frequencia", main="Histograma",include.lowest = F, right = F, xlim=c(min(resumo$breaks)-h/2, max(resumo$breaks)+h/2)) }

lapply(Micro2, function(x) histograma(x))