I have my info as in this photograph:
You can download it here: https://drive.google.com/file/d/1pgO51NXtjpVSz-VxQEDNFFuQXVc4jVkt/view?usp=sharing
What i want is to transform this data to individuals,
For example
Will transform into this
Another example
will turn into this
So, if we say that n="sum of all numbers in the original data.frame", i.e., the number of all individuals, the final output will be a data.frame
with 6 columns and n rows.
I want to do this in R but i don't have any idea how. Once I have this, what i want to do is apply a generalized linear model with family binomial and link = probit.
Now, this page can explain some of what I tried to do:
https://www.datanalytics.com/libro_r/la-funcion-melt-y-datos-en-formato-largo.html
Okay... I have an answer, but... i was wondering if there exists any generalization. Here it goes: