IDEMSInternational / R-Instat

A statistics software package powered by R
http://r-instat.org/
GNU General Public License v3.0
38 stars 103 forks source link

Adding variable labels with Moustpha's data #8636

Open rdstern opened 11 months ago

rdstern commented 11 months ago

@lilyclements I describe a possible problem that Raphael could examine. If I am correct, then it might give some correction work for Derek, plus a possible first task for Raphael.

Moustapha's data from Excel, is in 2 data frames. There is the dataand there also is a second sheet which gives the description of most of the variables - that's the metadata.

In R each variable can add a variable label. Here is an example using the MICS data from Pakistan:

image

Now I would like to add the same descriptions of each variable for Moustapha's data. (Later a second problem could be to simplify the names in Moustapha's data.)

I found one initial puzzle, namely that I expected as many rows in the metadata as columns in the data. They are not the same.

  1. First is to investigate the current way you can easily add these labels. This uses the Prepare > Data Frame > Rename dialog.

Here it is for the MICS data:

You should now be able to copy information from the metadata dataframe, and paste into this dialog. Could you (and Raphael) try this to add the labels into his data.

I tried and I think I found a bug. If so, then report it, in this thread. I suggest that might be a @derekagorhom problem to solve, with possible help from @lilyclements.

  1. Second is to check whether an alternative way of doing this task might be a suitable first task for Raphael. This is to be able to paste directly into the column in the metadata window, see above.

@Patowhiz I am bringing you in partly to introduce Raphael. He is currently more computing than stats and I would like to start him on a simple development task or two while he is on the AIMS course - he has help for the next 3 weeks from Derek and Lily and Francis, so it is a good time for him to start.

Is this pasting easy enough as a task. We now have your copy/paste included, but only within the data windows. This is another example. (There are many other tasks if this is too difficult as a first task, or not especially important.)

Patowhiz commented 11 months ago

@rdstern he may have to check on the required code for back end and front end. Then also do it in a way that the pasting is reproducible. I'd recommend this to someone familiar with both ends of our base code though it's not a very difficult task.

rdstern commented 11 months ago

@Patowhiz thanks for this. I'll suggest he starts on something less then.