[R] Error in merge [negative length vectors are not allowed]
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jun 17 06:45:27 CEST 2014
On 16/06/2014 23:21, Kate Ignatius wrote:
> Hi All,
>
> I'm trying to merge two files together using:
>
> combinedfiles <- merge(comb1,comb2,by=c("Place","Stall","Menu"))
>
> comb1 is about 2 million + rows (158MB) and comb2 is about 600K+ rows (52MB).
>
> When I try to merge using the above syntax I get the error:
>
> Error in merge.data.frame(comb1, comb2, by = c("Place","Stall","Menu")) :
> negative length vectors are not allowed
>
> Is there is something that I'm doing wrong? I've merged larger files
Not telling us the the 'at a minimum' information asked for in the
posting guide.
> together in the past without a problem so am curious what might be the
> problem here...
>
> Thanks in advance!
>
> ~K
This is usually an indication that you are trying to create more than
2^31 rows in the result, which looks plausible given your data set
sizes. AFAICS merge does not allow long vectors on a 64-bit system in
released versions of R.
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list