Reputation: 2743
Is Weka appropriate for basic data wrangling, such as reshaping a table as explained HERE, or for coding Missing Values? I can't seem to find the data wrangling features in the interface.
Or do you use some other software to do the data wrangling / preprocessing the data before applying analysis via Weka?
Upvotes: 0
Views: 145
Reputation: 9303
What exactly do you want to do?
I don't think that you need to "melt" your data (transform to key-value pairs), because then the result would be unsuitable for Weka, presumably. Weka needs the attributes in columns. The opposite operation is called casting, in R this would be implemented with the dcast() function of the reshape2 package.
Melting would be possible with the melt() function of the reshape2 package.
Nowadays, you can also do melting with the gather() function of the tidyr package, and casting with the tidyr::spread() function.
Be warned: these packages take some time to learn.
You can then use the write.arff() function of the foreign
package to export your data as an .arff file for easy import into Weka.
Upvotes: 1