Jim Is this what you need?
#create data Lines <- "Drug1 Drug2 Drug3 Drug4 153 133 145 111 189 177 200 170 221 241 187 243 215 228 201 178 302 283 292 248 223 255 220 202 201 238 233 163 173 164 172 139 121 128 119 120 100 200 300 400" # read in data d <- read.table(textConnection(Lines), header = TRUE) #add row.names row.names(d)=paste("trial_number",sprintf("%02d",as.numeric(row.names(d))),sep="") # view output print(d) HTH Pete -- View this message in context: http://r.789695.n4.nabble.com/adding-a-row-of-names-to-data-frame-tp2278278p2278345.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ 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.