I’m new to R, so please bear with me… I managed to load a data frame, and the header has columns such “data$x.y.1” and “data$x.y.2”. I want to programmatically generate the column names to extract each column and plot a histogram. In short, I want to construct ‘data$x.y’ + n, where I’m going to iterate over n. I tried cat and got:
as.name(cat("data$x.y", i, sep="."))
data$x.y.1Error in as.name(cat("data$x.y", i, sep = ".")) :
invalid type/length (symbol/0) in vector allocation
should get your column names
if you want a histogram for each column of data
That will plant a bunch of .png files with names like x.y.1.png in your working directory.