Hello, My data is "study.txt":
"Not A" "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]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.