How can I export data from DataCamp?

情到浓时终转凉″ 提交于 2021-02-07 09:40:57

问题


I use DataCamp for online learning of R. Sometimes I would like to export the data used in the exercises, but I can't find an easy way to do so.

I know that there are instructions for downloading the videos or slides, and some courses provide some selected datasets for download in the course description. But how do I download data that I can access through the DataCamp exercise interface for export outside of the platform?


回答1:


A comfortable way to move data from one session to another is the function dput(). If the data is big you could do it in steps:

dput(df[1:100, ])
dput(df[101:200, ])
# ...
# Finally rbind() in your local session and save to hardrive



回答2:


I eventually succeeded by using the DataCamp console to write the desired dataset as a CSV file, something like this in the console:

write.csv(df)

It wrote the entire output to the console and I dragged and copied the whole thing (in my case, over 4 MB of text). It was a properly formed CSV file which I saved and then imported into RStudio and then could play with as I pleased.



来源:https://stackoverflow.com/questions/53523721/how-can-i-export-data-from-datacamp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!