How to extract the datasets that are provided in r libraries into csv files. Faced this issue when trying to implement R related data analysis programs in python.
First you can make sure the data is loaded from the package with data()
and then write it out with write.csv
data(Boston, package = "MASS")
write.csv(Boston, "Boston.csv")