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@.Data) :
  variable names are limited to 10000 bytes

How can it be solved?

Thanks:

John

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to