[R] colnames from read.table

Chua Siang Li siang.li.chua at acceval-intl.com
Thu Jul 31 04:36:16 CEST 2008

   Hi.  May I know why the colnames is NULL when reading only 1 column from a
   csv file?  How do I get the colname then? Thanks.
   > xy = read.table("dataFile.csv",header=T, sep=",")
   > y <- xy[,1]
   > xDate <- xy[,2]
   > x <- xy[,3:8]
   > colnames(y)
   > colnames(xDate)
   > colnames(x)
   [1]    "Market.Price"    "Quantity"        "Country"        "Incoterm"
   [6] "PaymentTerm"
   Chua Siang Li
   Consultant - Operations Research
   Acceval Pte Ltd
   Tel: 6297 8740
   Email: siang.li.chua at acceval-intl.com
   Website: www.acceval-intl.com
   This message and any attachments (the "message"...{{dropped:12}}

More information about the R-help mailing list