Skip to content
Back to formatted view

Raw Message

Message-ID: <F51A6C9A-2CAC-4174-9782-547C3BF0D39B@gmail.com>
Date: 2012-09-08T02:54:32Z
From: Youn Se Hwan
Subject: How to Rename Column Labels?

Hi,

How do I rename the column labels in the table?

For Instance, if I have a table like this, and I want to have the column labels changed from "A1 A2 A3 A4 A5" to "Mike Kate Michelle Paul Young"

      A1     A2     A3    A4    A5
1  33    44      55      66    77
2
3
4
5
6
7
7
8
9

and my text file location is: ""/Users/MAC/Desktop/data.txt"

When I type in colnames(data.txt)[1] <- "Income", I get an error message saying "target of assignment expands to non-language object".

Thanks!