Hey everyone,
I can't figure out how to make it work. Some people asked similar questions in r-forums but it seems my understanding is to basic to make the transfer.
I have a large repeated measures dataset in long format and i performed a cluster-analysis. Now I need to copy the value signalling group-membership inside the second column based on Participant-ID.
See attachement for clarification. Left side of the picture is the current state, right side is what i hope to achieve.
Thank you in advance,
Philipp
Copy value inside column based on another column (ID)
Copy value inside column based on another column (ID)
- Attachments
-
- Copy values inside column based on id.PNG (4.87 KiB) Viewed 853 times
Re: Copy value inside column based on another column (ID)
Hey @Philipp.B,
if things are like in your attachment I suggest you use transform on the Cluster variable to get a new one (e.g. Cluster_new) with what you need.
How to do?
Take a look at the screenshot attached, it's a small example that I hope will help you. Cheers,
Maurizio
if things are like in your attachment I suggest you use transform on the Cluster variable to get a new one (e.g. Cluster_new) with what you need.
How to do?
Take a look at the screenshot attached, it's a small example that I hope will help you. Cheers,
Maurizio
Re: Copy value inside column based on another column (ID)
Hey Maurizio,
thank you for the fast and also very easy solution. I tried it in a small example dataset and it does exactly what I need. However, the actual dataset seems to be too much to handle as jamovi stops computing after five minutes and simply deletes my transformation. @jonathon: Any ideas?
Edit some hours later: The simple and obvious solution was to decrease the amount as much as possible. Now it still takes some minutes but works out in the end.
thank you for the fast and also very easy solution. I tried it in a small example dataset and it does exactly what I need. However, the actual dataset seems to be too much to handle as jamovi stops computing after five minutes and simply deletes my transformation. @jonathon: Any ideas?
Edit some hours later: The simple and obvious solution was to decrease the amount as much as possible. Now it still takes some minutes but works out in the end.
Re: Copy value inside column based on another column (ID)
oh yup. the VMODE() is an expensive operation, and it's probably being computed separately for every row in the data set. i should see if there's a way i can optimise this a bit more.
one potential optimisation you could do would be to calculate the VMODE separately in it's own column, and then refer to that.
cheers
jonathon
one potential optimisation you could do would be to calculate the VMODE separately in it's own column, and then refer to that.
cheers
jonathon