merge files

General help and assistance with jamovi. Bug reports can be made at our issues page: https://github.com/jamovi/jamovi/issues . (If you're unsure feel free to discuss it here)
Post Reply
de23
Posts: 3
Joined: Wed Dec 11, 2024 2:16 pm

merge files

Post by de23 »

Hello,

Is there a function available to merge two or more datafiles based on ID numbers (for example pre-intervention data in one dataset with post-intervention data recorded in a separate dataset)? Or if it's not possible to merge these files, is there a workaround for this? Copying and pasting variables also doesn't seem to be an option.

Thanks.
User avatar
jonathon
Posts: 2757
Joined: Fri Jan 27, 2017 10:04 am

Re: merge files

Post by jonathon »

take a look at jTransform in the jamovi library

jonathon
de23
Posts: 3
Joined: Wed Dec 11, 2024 2:16 pm

Re: merge files

Post by de23 »

Thanks. I've installed jTransform, but am getting an error message after I try to merge two files (to add columns): 'nzchar()' requires a character vector. What does this mean and how do I fix it? The variable to match datasets by is set as an ID data type (ID consists of characters and digits); no other variables match exactly.
User avatar
MAgojam
Posts: 436
Joined: Thu Jun 08, 2017 2:33 pm
Location: Parma (Italy)

Re: merge files

Post by MAgojam »

Hey @de23,
I'll pass this on to @Sebastian Jentschke, the author of jTransform, to take a look here.

If you need a lightweight thing to merge a before and after into a new file, you might be interested in trying a "Merge Colunms" that we have in the jReshape module.

You can find it in the jamovi library and after installation it will be in the ribbon (Data Icon) like jTransform.
Let me know if it fits your merge needs.

Cheers,
Maurizio
https://www.jamovi.org/about.html
User avatar
sjentsch
Posts: 10
Joined: Wed Nov 06, 2019 2:34 pm
Location: Bergen, Norway
Contact:

Re: merge files

Post by sjentsch »

If you can, please send me the files (sebastian.jentschke@uib.no) and I will have a look.

Best regards,

Sebastian
de23
Posts: 3
Joined: Wed Dec 11, 2024 2:16 pm

Re: merge files

Post by de23 »

I've managed to get it working by sorting the participants alphabetically in each file.

But I'm now hitting a new problem - variables with numbers assigned to levels (e.g. agree = 1, neutral = 2, disagree = 3) are having new numbers assigned to the levels in the merged file (e.g. agree = 0, neutral = 1, disagree = 2), which then affects the scoring of some of my measures. Is there a way I can stop this happening (i.e. keep the numbers I have already assigned to levels before the merge)?
User avatar
sjentsch
Posts: 10
Joined: Wed Nov 06, 2019 2:34 pm
Location: Bergen, Norway
Contact:

Re: merge files

Post by sjentsch »

Hei,

as I said before, it is easiest for me to find and correct errors if you could share the files and give a clear description of what the error is.

You may first try again with the most recent version of the module (0.4.1; should appear soon, I asked Jonathon to compile this version for the jamovi library yesterday). Recently, I did some changes in jmvReadWrite (the R-package that is behind jTransform) regarding how I write nominal / ordinal data. This may solve your problem.

Best regards,

Sebastian
Post Reply