>>>>> "DN" == David Neu <da...@davidneu.com> >>>>> on Mon, 12 Jul 2010 18:15:04 -0400 writes:
DN> Hi, Is there a way to create a matrix in which the DN> column names are not checked to see if they are valid DN> variable names? Why do you need that if you are really using a matrix, not a data frame? DN> I'm looking something similar to the check.names DN> argument to data.frame. That's a good idea. The relevant code inside data.frame() is simply if (check.names) vnames <- make.names(vnames, unique = TRUE) DN> If so, would such an approach work for the sparse matrix DN> classes in the Matrix package. Using function make.names(), yes of course. {but I'm still puzzled *why* you need this; If you want only want somewhat *short* names, I'd rather use vnames <- abbreviate(vnames, 8) or variations of that such as vnames <- abbreviate(vnames, 8, method="both.sides") or also vnames <- abbreviate(vnames, 8, strict=FALSE) DN> Many thanks! you're welcome! Martin Maechler, ETH Zurich ______________________________________________ R-help@r-project.org mailing list 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.