I'm preprocessing some data from sensor-created files into the format required for external analysis (ultimately, it needs to be output as a CSV). The end goal is something like this:
1 C3 C4 Cz Pz AllSites 2 C3 C4 Cz Pz AllSites 3 C3 C4 Cz Pz AllSites
50:23.9 0 0 0 0 0 53:15.0 0 0 0 0 0 09:15.0 0 0 0 0 0
50:24.9 1 0 0 1 0 53:16.0 1 0 0 1 0 09:16.1 0 0 1 0 0
50:26.0 1 0 0 0 0 53:17.1 1 0 0 1 0 09:17.1 0 0 1 0 0
50:27.0 1 0 0 1 0 53:18.1 1 1 1 0 0 09:18.1 0 0 1 1 0
50:28.0 0 1 0 0 0 53:19.2 1 0 0 0 0 09:19.2 0 0 1 0 0
50:29.1 1 1 1 1 1 53:20.2 1 0 0 1 0 09:20.2 0 0 1 0 0
50:30.2 0 1 1 0 0 53:21.2 1 0 0 0 0 09:21.2 0 0 0 1 0
50:31.2 0 0 0 0 0 53:22.3 0 0 0 0 0 09:22.3 0 0 0 1 0
Each set of columns is data from one session. The only catch is that sessions are of inequal length (and thus each group has a different number of observations), so at the moment, it's all in a list instead of a data frame. I have found a few different ways of exporting to CSV (e.g., this question), but they all involve converting to a data frame first. How do I export a list to CSV without converting it to a data frame first?
N.B.: I also found a bunch of questions about exporting a list of data frames to a series of CSV files, but for this application, all the data frames need to be in a single CSV.