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

  • SEARCH
  • Home
  • 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 6528167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:30:34+00:00 2026-05-25T09:30:34+00:00

I have a paneldata which looks like: (Only the substantially cutting for my question)

  • 0

I have a paneldata which looks like:

(Only the substantially cutting for my question)

Persno 122 122 122 333 333 333 333 333 444 444 
Income 1500 1500 2000 2000 2100 2500 2500 1500 2000 2200
year 1990 1991 1992 1990 1991 1992 1993 1994 1992 1993

Now I would like to give out for every row (PErsno) the years of workexperience at the begining of the year. I use ddply

hilf3<-ddply(data, .(Persn0), summarize, Bgwork = 1:(max(year) - min(year)))

To produce output looking like this:

Workexperience: 1 2 3 1 2 3 4 5 1 2

Now I want to merge the ddply results to my original panel data:

data<-(merge(data,hilf3,by.x="Persno",by.y= "Persno"))

The panel data set is very large. The code stops because of a memory size error.

Errormessage:

1: In make.unique(as.character(rows)) :

Reached total allocation of 4000Mb: see help(memory.size)

What should I do?

  • 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-05-25T09:30:35+00:00Added an answer on May 25, 2026 at 9:30 am

    Re-reading your question, I think you don’t actually want to use merge here at all. Just sort your original data frame and rbind Bgwork from hilf3. And also, your ddply-call could perhaps result in a 1:0 sequence, which is most likely not what you want. Try

    data = data[order(data$Persno, data$year),]
    hilf3 = ddply(data, .(Persno), summarize, Bgwork=(year - min(year) + 1))
    stopifnot(nrow(data) == nrow(hilf3))
    stopifnot(all(data$Persno == hilf3$Persno))
    data$Bgwork = hilf3$Bgwork
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a paneldata which looks like: (Only the substantially cutting for my question)
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=
I have a strongly typed viewpage that I created that looks like this: <%@
I have a servlet that calls MySQL database. The deletePage method looks like this:
have written this little class, which generates a UUID every time an object of
Have deployed numerous report parts which reference the same view however one of them
I have a pandas panel of investment pricing data to which I want to
I have html which contains such text ....... <a class=product_name href=index.php?productID=29785>Funny</a> ........ <a class=product_name
have a php code like this,going to convert it in to C#. function isValid($n){
Have a question - you see a lot of free font conversion tools online.

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.