Hello,



My data is "study.txt":



"A" "Not A"
"Mathematics" 80 15
"Physics" 32 24
"Biology" 18 29





I want to transform this data into with column names 'course' and 'A':



                   course                       A

             1   Mathematics              1

             2   Mathematics              1

             ..  ......                             ..

            80  Mathematics              1

            81  Mathematics              0

            ...       ............                 ...

            95  Mathematics              0

            96  Physics                      1

             ...       ............                                    ...

           127 Physics                      1
           128 Physics                      0

           ...         ............                     ...

           151  Physics                     0



        etc.



 How should I do it? So this data frame will consist from 198 rows.



Thank you very much.



kind regards,

T. Bal

	[[alternative HTML version deleted]]

