I have a data.frame and I want to change into a table. It has three columns: Number, Study, Classes and Year. I've slitting it into those different Classes (nursery, grammar school, college), producing 9 different dataframes each bellowing to a different class. In the end I've excluded the Class column maintaining just the Number, Study and Year. After that I've converting each of those dataframes, classified by classes, into a table, using:
GT <- xtabs(G$Number ~ G$Study + G$Year, G)
However, this equation continues bring the Class former information, the one I've cut down. I've no clue about what is going wrong.