[R] labels

Anna H. Pryor anna at ptolemy.arc.nasa.gov
Tue Apr 29 18:04:31 CEST 2003


I don't know how to retain my row labels.  I read in a table with row labels, 
ie:  

Price   Floor  Area  Rooms
52.      111.   830    5
54.      128.   710    5
47.4    101   1000   4
...

but then I need to transform the data

raggedRidzeros <- function(x){
	 	  
	y = list(ridzeros(x[[1]]))
	for(i in 2:length(x)){
	  y = c(y,list(ridzeros(x[[i]])))
	}
	y

}

(where ridzeros is a function that I call to get rid of the zeros in the 
vector) 
When I do this, I no longer have row labels.  Is there any way to insert the 
row labels from the original calling function into this function?

Anna



More information about the R-help mailing list