> ## 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.

# R スクリプトを書いてデータを取得する

Exploratoryの中で、R スクリプトを書いてデータを取得できます。例えば"Google Trend"のようなR パッケージを使って検索用語のトレンディングデータを取得したり、"Quantmod"パッケージを使って株価、為替レートのような金融データを取得したり、または複数のファイルからデータを抽出して一つのデータフレームにするプログラムを書くこともできます。Rスクリプトを使うと、様々なデータを色々な方法で取得できるようになり、とても強力な機能です。

![](https://mintcdn.com/exploratory-inc/_cHetG8yIT5gmGiQ/ja/import/images/r-script-data2.png?fit=max\&auto=format\&n=_cHetG8yIT5gmGiQ\&q=85\&s=6e94cdfff9c4cbb475ed08a282821d2a)

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

Rスクリプトを使ってデータを取得する、簡単に試せる例をいくつか以下に紹介しておきます。

* [Introduction to tidyquant - Stock Market Data Analysis(英語)](https://blog.exploratory.io/introduction-to-tidyquant-quantitative-financial-analysis-for-tidyverse-habitats-e5f72a023ce2)

* [SQLがややこしいのでdplyrでクエリーを書いて直接データベースからデータを取ってくる](https://exploratory.io/note/2ac8ae888097/7616236230994462?cb=1506281367163)

* [SparklyrでExploratoryからSparkに接続してみる (SQL編)](https://exploratory.io/note/2ac8ae888097/2569131745987096?cb=1506281323040)

* [SparklyrでExploratoryからSparkに接続してみる (dplyr編)](https://exploratory.io/note/2ac8ae888097/0305916276166750?cb=1506281306518)

* [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.