I have a list that I am using for the legend of a plot
gases = {"Air", "He", "Ar", "\!\(\*SubscriptBox[\(N\), \(2\)]\)", "\!\(\*SubscriptBox[\(CO\), \(2\)]\)"};
However, I also want to Export
the data as a CSV table. When I do this the header gets all wacky:
ExportString[Join[{gases}, RandomInteger[{0, 1}, {2, 5}]], "CSV"]
"Air,He,Ar,\"N \" 2,\"CO \" 2 0,0,0,1,1 1,1,0,1,1"
This is obviously because of the SubscriptBox
. So how can I remove these so that
Foo[gases]
{"Air", "He", "Ar", "N2", "CO2"}