Re: [R] Having a problem with labels

2014-01-09 Thread Sarah Goslee
Hi Jeff, If you read the help for labels(), it says that for a dataframe it returns the dimnames: the first component is the row names, which by default are numbers, and the second component of the list is the column names. Since you appear to want just the latter, you could use colnames(df) in

Re: [R] Having a problem with labels

2014-01-09 Thread Rui Barradas
Hello, According to the help page for ?labels, for a data.frame it's simply the dimnames, meaning, the row names (your numbers) and the column names. Note that read.csv returns a data.frame, not a matrix, and data frames allways have row names, typically numbers. I wouldn't worry about it. H

[R] Having a problem with labels

2014-01-09 Thread Jeff Johnson
Hi, I'm having a problem with my labels. I am reading in a data file: df <- read.csv(file = 'batch1extract_100k_sample.csv') However, it's producing two sets of labels: > labels(df) [[1]] [1] "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" "11" "12" "13" "14" "15" "16" "17" "18" "19" "20" "21