Tuesday, June 23, 2009

Reading in Row and Column names in read.table

Keep the total number of entries in the first row less than total number of entries in the rest of the lines of the files. read.table will it self recognize the first row of the file and first column of the file as the names.

you can check with row.names and colnames

e.g.

adultControl <- read.table ("control_adult_cerebellum.txt", sep="\t")
row.names(adultControl)
colnames(adultControl)