I asked a question about using R to perform some web scraping for some data analysis.
Now I have the data I want. It is in a double matrix.
I am using . How do I export that double matrix to use in Excel?
EDIT:
I also have mydtm as a DocumentTermMatrix. Would that one be easier to extract?
EDIT: The code is included here : https://gist.github.com/simkimsia/7613396
Once you have got the data in the R studio, you can simply use the
write.csv
command for writing into csv format:This will create a file
your_file_name.csv
with the data ofmy_df
in your current working directory.EDIT:
As this won't be working for a double matrix, you could form a new character matrix in the following way and then use
write.csv
:Please try this.