I am creating a character vector in which I want to describe information about the columns of my data frame. When I combine text and functions I obtain an empty vector of length 0, for which calling my vector is meaningless.
I am using the cat() function to do this:
columns <- cat("Columns in dataset describe annotations for 28416 genes. Variables:", colnames(DATA)[c(1, 11, 12, 13, 14)], "present descriptive information, variables:", colnames(raw.data), "represent expression data of three experimental conditions.")
When I run this, it works great. I get a paragraph. But when I call my vector, columns, I get: NULL
By the way, print and paste are not of use in this example, since they repeat my text for each column name. Which I don't need.
Thanks!