Hi Bert, Yes, I'm aware of the difference between a and "a" but in terms of object classes I don't see the difference between "a" and names(mtcars)[1]. They're both strings. However, for creating a named character vector, this works:
c("a" = "b) But this doesn't c(names(mtcars)[1] = "b") For example: df <- data.frame("a" = 1:5) c("a" = "b") c(names(df)[1] = "b") # error But identical(names(df)[1], "a") That was my initial question. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.