0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

メモ:R上のデータをローカルに保存する

Last updated at Posted at 2021-12-31

やりたいこと

複数のターミナルでRを実行しマルチスレッド化しており,それぞれの結果を一つのプロセスで扱いたい状況になった.
そのため,R言語でデータのみを保存して別環境で読み込みたい.
snowパッケージなどの並列化パッケージを使えればそんなことしなくてもいいかもしれないが...

### 別環境で読み込むデータ
tmp <- "Hello"

### データを保存する
save(tmp,file = "tmp.rda")

### データを読み込む
load("tmp.rda")

tmp #"Hello"

注意:save()関数でデータを読み込む際に変数名とファイル名は合わせるようにする.

tmp <- "Hello"
save(tmp,file = "data.rda")

load("data.rda")
data #"Hello"と出力されない
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?