concatenation

R - concatenate multiple rows into one beside each other

百般思念 提交于 2020-12-13 18:25:00
问题 I have a dataframe with 3 columns and multiple rows. I want to split up the dataframe so that there is only one row and the values are in sequence (so essentially a one row csv). My dataframe looks like this: **Subject Module ID** History WW2 1 English Literature 2 Maths Algebra 3 What I am trying to achieve is one row that will look like this and in this order: History, WW2, 1, English, Literature, 2, Maths, Algebra, 3 I can do it with cut and paste using excel but was wondering was there a