[R] Reading two-cloumn CSV file into a hash table

Khanvilkar, Shashank skhanvil at qualcomm.com
Mon Sep 26 20:07:40 CEST 2011


Hello All, 
Thanks in advance for all help,

I am trying to read a two column csv file in R, which looks like:
X,1
Y,2
Z,3

I am using R commands:
tmp = read.csv("test.csv", colClasses=c("character", "character"))

How can make this into a hash table, so that I can access, tmp["X"] and it will return me "1"?

Shank



More information about the R-help mailing list