Problems encountered during R's big data operation: there cannot be negative length Vectors

Source: Internet
Author: User

Solution:

You can only use trick to reduce the size of the generated intermediate matrix. For example, the problem I encountered is:

I want to run (w % * % H % * % T (h) (W is 5000000*10, and H is 10*100000)

The following error is returned when w % * % H is executed: A negative length vector is not allowed.

Google found that r documents and records related to Chinese characters were really poor. Finally, the English sentence "negative length vectors are not allowed" was used,

Only when we see the explanations from outsiders can we understand that, in short, the data size is too large, and the r system cannot generate results with the data size exceeding 2 ^ 31.

After changing to (w % * % (H % * % T (h), the problem is solved...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.