Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8319699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:24:19+00:00 2026-06-08T22:24:19+00:00

I am using R for some data analysis. System specs: i5 + 4GB RAM.

  • 0

I am using R for some data analysis. System specs: i5 + 4GB RAM.
For some reason, my R session is taking up a chunk of my RAM much much bigger than my data which leaves me with very little space for other operations.

I read a 550MB csv file, memory taken by R: 1.3 – 1.5GB
I saved the csv as a .RData file. File size: 183MB. Loaded the file in R, memory taken by R: 780MB.
Any idea why this could be happening and how to fix it?

Edits:
The file has 123 columns and 1190387 rows. The variables are of type num and int.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T22:24:20+00:00Added an answer on June 8, 2026 at 10:24 pm

    A numeric value (double precision floating point) is stored in 8 bytes of ram.
    An integer value (in this case) uses 4 bytes.
    Your data has 1,190,387 * 123 = 146,417,601 values.
    If all columns are numeric that makes 1,171,340,808 bytes of ram used (~1.09GB).
    If all are integer then 585,670,404 bytes are needed (~558MB).

    So it makes perfect sense that your data uses 780MB of ram.

    Very General Advice:

    1. Convert your data.frame to a matrix. Matrix operations often have less overhead.
    2. Try R package bigmemory: http://cran.r-project.org/web/packages/bigmemory/index.html
    3. Buy more ram. Possibly your machine can support up to 16GB.
    4. Don’t load all your data into ram at the same time. Load subsets of rows or columns, analyze, save results, repeat.
    5. Use a very small test dataset to design your analysis, then analyze the full dataset on another machine/server with more memory.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm doing some data analysis over the judge appointment system in France, and using
I'm using R for data analysis, and I'm sharing some data with collaborators via
I've got some analysis code ( myprog ) that sucks in data using the
I'm using the MVC pattern to design some data analysis software (in Python ).
I am using Python and Numpy to do some data analysis. I have a
I am using scikit-learn for some data analysis, and my dataset has some missing
I've used F# to do some quick data-analysis using datastructures from another project. To
i posted some data using tinymce (in a symfony project).while retrieving back how can
I'm consuming some data using the fogbugz XML API. This API always offers data
I am trying to plot some data using pylab scatter function. I'm using pylab.scatter(X,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.