> ## Documentation Index
> Fetch the complete documentation index at: https://docs.exploratory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Write R Script to Get 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://mintcdn.com/exploratory-inc/7Kn_H2bJDKm3Jv90/en/import/images/r-script-data2.png?fit=max\&auto=format\&n=7Kn_H2bJDKm3Jv90\&q=85\&s=5de59aa61055e4b1f8ec198338706303)

![](https://mintcdn.com/exploratory-inc/7Kn_H2bJDKm3Jv90/en/import/images/r-script-data.png?fit=max\&auto=format\&n=7Kn_H2bJDKm3Jv90\&q=85\&s=c40c1acc0078b3f364e66ec10ccc1685)

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)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.