R: Pam function under cluster package not accepting data set having more than 65536 entries
If you read the package News section you will find:


  pam() now signals an error when there are more than 65536 observational units (whereas it could segfault previously), thanks to a patch from Mikko Korpela, Helsinki.


So it seems there isn't a solution.