Skip to content
Prev 139644 / 398506 Next

Creating plots for all variables in a data frame and printing them with the variable name in the main title

Try:

x <- data.frame(A=rnorm(100), B=rnorm(100), C=runif(100))
sapply(names(x), function(i)hist(x[,i], main = i))
On 17/03/2008, Uli Kleinwechter <ulikleinwechter at yahoo.com.mx> wrote: