# Write R Script as Data

You can write an R script to get data. For example, you might want to use R packages like 'Google Trend' to get search terms trending data, use 'Quantmod' package to get financial data like stock prices, currency exchange rates, etc, or write a program to extract data from multiple files and combine into one. You can get pretty much any data in any way by writing R script, it's that powerful.

![](https://2850417076-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4HLCK3olgduYoe3RVS%2F-M4oMvCUDQwHTJ0eWi_f%2F-M4oN74XY6c0QeQZE4yE%2Fr-script-data2.png?generation=1586795461617668\&alt=media)

![](https://2850417076-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M4HLCK3olgduYoe3RVS%2F-M4oMvCUDQwHTJ0eWi_f%2F-M4oN74Zbz_2v5mgBjBg%2Fr-script-data.png?generation=1586795461625690\&alt=media)

Here's a quick and simple example of how you can write R script as Data.

* [Introduction to tidyquant - Stock Market Data Analysis](https://blog.exploratory.io/introduction-to-tidyquant-quantitative-financial-analysis-for-tidyverse-habitats-e5f72a023ce2)
* [Using dplyr to query databases directly instead of using SQL](https://exploratory.io/note/2ac8ae888097/4608293349858884?cb=1506647866244)
* [How to access to your Spark from Exploratory with sparklyr (SQL version)](https://exploratory.io/note/2ac8ae888097/8385836660075252?cb=1506646442109)
* [Querying Spark Data with dplyr in Exploratory](https://exploratory.io/note/2ac8ae888097/9658701904142809?cb=1506646883371)
* [Accessing SQLite with RSQLite and Querying with dplyr in R Script](https://exploratory.io/note/2ac8ae888097/6847080671738131)
