Page 1 of 1
merge files
Posted: Thu Dec 12, 2024 4:30 pm
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.
Re: merge files
Posted: Fri Dec 13, 2024 2:11 am
by jonathon
take a look at jTransform in the jamovi library
jonathon
Re: merge files
Posted: Mon Dec 16, 2024 4:56 pm
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.
Re: merge files
Posted: Mon Dec 16, 2024 8:25 pm
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
Re: merge files
Posted: Mon Dec 16, 2024 9:01 pm
by sjentsch
If you can, please send me the files (
sebastian.jentschke@uib.no) and I will have a look.
Best regards,
Sebastian
Re: merge files
Posted: Wed Dec 18, 2024 3:39 pm
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)?
Re: merge files
Posted: Mon Jan 06, 2025 9:18 am
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