[R] Hash, variable names restriction

email email8889 at gmail.com
Fri Dec 19 01:09:27 CET 2014


Hi:

I have one million names of city and their population and want to make
a hash so that by giving key = city, the hash function will return its
population.

I use the hash package in R as follows:
h <- hash(c(as.vector(df$city)), c(as.vector(df$population)))

But getting the following error:
Error in assign(keys[[i]], values[[i]], envir = hash at .Data) :
  variable names are limited to 10000 bytes

How can it be solved?

Thanks:

John



More information about the R-help mailing list