SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
R の基本操作
              統計解析
      時系列データの解析
全球気象データ (NetCDF) の処理




        初心者向け R 講座

                  縫村崇行
          (NUIMURA, Takayuki)

             環境学・雪氷研究室


            R 勉強会 (CHERD)
                  2012/06/20




             T. Nuimura   初心者向け R 講座
R の基本操作
                           統計解析
                   時系列データの解析
             全球気象データ (NetCDF) の処理


Outline

  1   R の基本操作
          コマンドの入力
          グラフ作成
          外部データの入出力
  2   統計解析
       統計処理
       検定
  3   時系列データの解析
  4   全球気象データ (NetCDF) の処理
       特定地域の解析
       全球での解析
       世界地図と相関結果のプロット

                          T. Nuimura   初心者向け R 講座
R の基本操作
                       統計解析
               時系列データの解析
         全球気象データ (NetCDF) の処理


R の作図例




                      T. Nuimura   初心者向け R 講座
R の基本操作
                                   コマンドの入力
                       統計解析
                                   グラフ作成
               時系列データの解析
                                   外部データの入出力
         全球気象データ (NetCDF) の処理


R の起動と終了



 R の起動
   Windows:プログラムメニューから R を選択
   Linux:ターミナルで R と入力 (大文字なのに注意)

 R の終了コマンド
 > q()
 # ワークスペースの保存についての質問は No で OK




                      T. Nuimura   初心者向け R 講座
R の基本操作
                                        コマンドの入力
                            統計解析
                                        グラフ作成
                    時系列データの解析
                                        外部データの入出力
              全球気象データ (NetCDF) の処理


数値入力と変数

 数値の計算
 >2+3
 [1] 5
 >2ˆ8
 [1] 256

 変数
 > temp.dc <- 10
 > temp.dc
 [1] 10
 > temp.df <- 9 / 5 * temp.dc + 32
 > temp.df
 [1] 50

                           T. Nuimura   初心者向け R 講座
R の基本操作
                                                                コマンドの入力
                             統計解析
                                                                グラフ作成
                     時系列データの解析
                                                                外部データの入出力
               全球気象データ (NetCDF) の処理


グラフの基礎 (plot 関数)

 1 変数のプロット
 > temp <- c(10, 20, 15, 25, 20, 20)
 > plot(temp)

                             25
                             20
                      temp

                             15
                             10




                                  1       2         3           4   5   6

                                                        Index




                                       T. Nuimura               初心者向け R 講座
R の基本操作
                                                              コマンドの入力
                            統計解析
                                                              グラフ作成
                    時系列データの解析
                                                              外部データの入出力
              全球気象データ (NetCDF) の処理


グラフの基礎 (plot 関数)

 2 変数のプロット
 > year <- c(2000, 2004, 2005, 2007, 2010, 2011)
 > plot(year, temp)

                            25
                            20
                     temp

                            15
                            10




                                 2000    2002   2004     2006   2008   2010

                                                       year




                                        T. Nuimura            初心者向け R 講座
R の基本操作
                                                             コマンドの入力
                            統計解析
                                                             グラフ作成
                    時系列データの解析
                                                             外部データの入出力
              全球気象データ (NetCDF) の処理


グラフの基礎 (plot 関数)
 2 変数のプロット
 > year <- c(2000, 2004, 2005, 2007, 2010, 2011)
 > plot(year, temp, type=“l”, col=“red”, xlim=c(1990, 2020),
 ylim=c(0, 30))
                            30
                            25
                            20
                     temp

                            15
                            10
                            5
                            0




                                 1990   1995   2000   2005    2010   2015   2020

                                                      year




                                        T. Nuimura           初心者向け R 講座
R の基本操作
                                                                   コマンドの入力
                              統計解析
                                                                   グラフ作成
                      時系列データの解析
                                                                   外部データの入出力
                全球気象データ (NetCDF) の処理


グラフの基礎 (histogram 関数)

 ヒストグラムの作成
 > hist(temp)


                                                      Histogram of temp
                                   3.0
                                   2.5
                                   2.0
                       Frequency

                                   1.5
                                   1.0
                                   0.5
                                   0.0




                                         10          15               20   25

                                                            temp




                                              T. Nuimura           初心者向け R 講座
R の基本操作
                                                               コマンドの入力
                           統計解析
                                                               グラフ作成
                   時系列データの解析
                                                               外部データの入出力
             全球気象データ (NetCDF) の処理


グラフの基礎 (histogram 関数)

 大量のデータのヒストグラム
 > hist(rnorm(10000))


                                              Histogram of rnorm(10000)
                                1500
                    Frequency

                                1000
                                500
                                0




                                        −4     −2          0         2    4

                                                      rnorm(10000)




                                         T. Nuimura            初心者向け R 講座
R の基本操作
                                                               コマンドの入力
                            統計解析
                                                               グラフ作成
                    時系列データの解析
                                                               外部データの入出力
              全球気象データ (NetCDF) の処理


グラフの基礎 (histogram 関数)

 大量のデータのヒストグラム
 > hist(rnorm(10000), col=“lightblue”, breaks=100)


                                               Histogram of rnorm(10000)
                                 400
                                 300
                     Frequency

                                 200
                                 100
                                 0




                                          −2             0             2   4

                                                      rnorm(10000)




                                        T. Nuimura             初心者向け R 講座
R の基本操作
                                   コマンドの入力
                       統計解析
                                   グラフ作成
               時系列データの解析
                                   外部データの入出力
         全球気象データ (NetCDF) の処理


R で取り扱えるデータ

 一般的なデータだと
   xls:csv に変換しといたほうが簡単
   csv:簡単に読み込める
   txt:csv 以外の文字(タブ、スペースなど)区切りデータ
   dbf:GIS の属性テーブル情報を扱いたいときなど
   画像データ:画像処理も

 科学関連のデータでは
   GeoTiff:リモセンデータ
   Shapefile:GIS データ
   NetCDF:気候データで一般的

                      T. Nuimura   初心者向け R 講座
R の基本操作
                                         コマンドの入力
                             統計解析
                                         グラフ作成
                     時系列データの解析
                                         外部データの入出力
               全球気象データ (NetCDF) の処理


CSV データ読み込み


 データのある場所に移動
 # Windows: C ドライブの r_lecture フォルダの場合
 > setwd(“C:/r_lecture”)

 # Ubuntu: /home/username/r_lecture フォルダの場合
 > setwd(“/home/username/r_lecture”)

 read.csv 関数
 # 月平均気温 (2001–2010) のデータ、
 > temp <- read.csv(“nagoya_temp.csv”)




                            T. Nuimura   初心者向け R 講座
R の基本操作
                                        コマンドの入力
                            統計解析
                                        グラフ作成
                    時系列データの解析
                                        外部データの入出力
              全球気象データ (NetCDF) の処理


CSV データ加工




 matrix 関数で 2 次元配列に変換
 > temp.matrix <- matrix(temp[,2], 10, 12, byrow=T)

 # dim 関数で次元数のチェ    ック
 > dim(temp.matrix)
 [1] 10 12




                           T. Nuimura   初心者向け R 講座
R の基本操作
                                       コマンドの入力
                           統計解析
                                       グラフ作成
                   時系列データの解析
                                       外部データの入出力
             全球気象データ (NetCDF) の処理


CSV データ出力



 2 次元配列の列と行にラベルをつける
 # 列ラベルに月
 > colnames(temp.matrix) <- 1:12
 # 行ラベルに年
 > rownames(temp.matrix) <- 2001:2010

 2 次元配列を CSV に出力
 > write.csv(temp.matrix, “temp_matrix.csv”)




                          T. Nuimura   初心者向け R 講座
R の基本操作
                                      コマンドの入力
                          統計解析
                                      グラフ作成
                  時系列データの解析
                                      外部データの入出力
            全球気象データ (NetCDF) の処理


NetCDF データ読み込み

 RNetCDF パッケージ
 # パッケージの読み込み
 > library(RNetCDF)

 # 今回使用するデータは 5◦ グリッド、
 # 1850 Jan.–2011 Oct. の月別気温偏差
 > nc <- open.nc(“CRUTEM3.nc”)
 > nc.data <- var.get.nc(nc, “temp”)

 # dim 関数で次元数のチェック
 > dim(nc.data)
 [1] 72 36 1942

 ※次元数はそれぞれ、経度方向 (W180⇒E180)、緯度方向
 (S90⇒N90)、時間 (1850 年から 160 年間 ×12 + 10)
                         T. Nuimura   初心者向け R 講座
R の基本操作
                           統計解析        統計処理
                   時系列データの解析           検定
             全球気象データ (NetCDF) の処理


2 次元配列の計算




 apply 関数で縦・横それぞれの計算
 # 横方向、つまり年別の平均
 > apply(temp.matrix, 1, mean)

 # 縦方向、つまり月別の平均
 > apply(temp.matrix, 2, mean)

 mean 以外にも、sum、max、min、sd、summary なども。




                          T. Nuimura   初心者向け R 講座
R の基本操作
                            統計解析        統計処理
                    時系列データの解析           検定
              全球気象データ (NetCDF) の処理


t 検定


 t.test 関数
 # 2001 年と 2010 年の気温差を検定
 > t.test(temp.matrix[1,], temp.matrix[10,])
 t = -0.1723, df = 22, p-value < 0.8648
 # 2001 年と 2010 年では有意な気温差なし

 # 2001–2010 の 1 月と 2 月の気温差を検定
 > t.test(temp.matrix[,1], temp.matrix[,2])
 t = -3.1955, df = 15.935, p-value < 0.005654
 # 1 月と 2 月では有意な気温差あり




                           T. Nuimura   初心者向け R 講座
R の基本操作
                             統計解析        統計処理
                     時系列データの解析           検定
               全球気象データ (NetCDF) の処理


無相関検定




 cor.test 関数
 # 2001 年と 2010 年の気温の相関
 > cor.test(temp.matrix[1,], temp.matrix[10,])
 t = 22.804, df = 10, p-value < 5.93e-10
 cor 0.9905215
 # 相関係数 0.99 の有意な相関




                            T. Nuimura   初心者向け R 講座
R の基本操作
                      統計解析
              時系列データの解析
        全球気象データ (NetCDF) の処理




時系列データの解析の章は保科さんが担当します。
内容
     時系列データプロット                  Download


     移動平均   Download


     最小二乗法で線形回帰                  Download


     周波数解析     Download




                           T. Nuimura       初心者向け R 講座
R の基本操作
                                        特定地域の解析
                           統計解析
                                        全球での解析
                   時系列データの解析
                                        世界地図と相関結果のプロット
             全球気象データ (NetCDF) の処理


任意の地域のデータの取り出し



 多次元配列データの取り出し方
 # 2 次元配列の場合
 # temp.matrix から 2003–2006 を抽出
 > temp.matrix[3:6,]

 # 加えて、6–9 月を抽出
 > temp.matrix[3:6, 6:9]

 3 次元配列 (x, y, time) から、指定領域・期間を抽出するには、
 matrix[x 範囲, y 範囲, time 範囲]




                           T. Nuimura   初心者向け R 講座
R の基本操作
                                       特定地域の解析
                           統計解析
                                       全球での解析
                   時系列データの解析
                                       世界地図と相関結果のプロット
             全球気象データ (NetCDF) の処理


meanRange.r スクリプトについて



 配布した meanRange.r スクリプトでは
  1   抽出する、緯度経度範囲、期間 (1850–2011) の間で指定
  2   緯度、経度、年を配列番号に換算
  3   NetCDF データから指定範囲・期間を抽出
  4   指定範囲内の JJAS 平均を計算
  5   計算結果を出力
  Download




                          T. Nuimura   初心者向け R 講座
R の基本操作
                                       特定地域の解析
                           統計解析
                                       全球での解析
                   時系列データの解析
                                       世界地図と相関結果のプロット
             全球気象データ (NetCDF) の処理


年輪データと全球グリッドの相関


 配布した corGlobal.r スクリプトでは
  1   解析する期間 (1850–2011) の間で指定
  2   年を配列番号に換算
  3   NetCDF データから指定期間を抽出
  4   指定範囲内の JJAS 平均を計算
  5   年輪データ (CSV) 読み込み
  6   グリッドごとに相関を計算
  7   計算結果を出力
  Download




                          T. Nuimura   初心者向け R 講座
R の基本操作
                                       特定地域の解析
                   統計解析
                                       全球での解析
           時系列データの解析
                                       世界地図と相関結果のプロット
     全球気象データ (NetCDF) の処理


世界地図と相関結果のプロット


      50
      0
      −50




            −150   −100    −50     0      50   100   150




                      T. Nuimura       初心者向け R 講座

Más contenido relacionado

Destacado

Front-end tower of Babylon
Front-end tower of BabylonFront-end tower of Babylon
Front-end tower of BabylonDenis Radin
 
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 MinutesVirginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 MinutesHadi Aboukhater
 
McCormick Mobile Media - Mobile Giving
McCormick Mobile Media - Mobile GivingMcCormick Mobile Media - Mobile Giving
McCormick Mobile Media - Mobile GivingEric McCormick
 
Student Worker Experience by Anders Selhorst
Student Worker Experience by Anders SelhorstStudent Worker Experience by Anders Selhorst
Student Worker Experience by Anders SelhorstTALA 2014 Conference
 
Chiapas los-rumbos-de-otra-historia
Chiapas los-rumbos-de-otra-historiaChiapas los-rumbos-de-otra-historia
Chiapas los-rumbos-de-otra-historiaVeronica Rodriguez
 
Costa Rica Real Estate Opportunities tour, bargains for both self directed IR...
Costa Rica Real Estate Opportunities tour, bargains for both self directed IR...Costa Rica Real Estate Opportunities tour, bargains for both self directed IR...
Costa Rica Real Estate Opportunities tour, bargains for both self directed IR...Pacific Lots of Costa Rica
 
Fields Letter of Gratitude
Fields Letter of GratitudeFields Letter of Gratitude
Fields Letter of GratitudeGina Miller
 
2014 1 horarios 10 a (1)
2014 1 horarios 10 a (1)2014 1 horarios 10 a (1)
2014 1 horarios 10 a (1)Ramón Díaz
 
No Smoking
No SmokingNo Smoking
No Smokingcsvp
 
WALK INTERVIEW FOR BE in Mechanical/Electrical Engineers
WALK INTERVIEW FOR BE in Mechanical/Electrical Engineers WALK INTERVIEW FOR BE in Mechanical/Electrical Engineers
WALK INTERVIEW FOR BE in Mechanical/Electrical Engineers G P SUDHAKARA BABU
 

Destacado (16)

Front-end tower of Babylon
Front-end tower of BabylonFront-end tower of Babylon
Front-end tower of Babylon
 
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 MinutesVirginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
Virginia Startup to Deliver Cheap and Healthy Meals to DC in Under 20 Minutes
 
Asesorías laborales para jóvenes
Asesorías laborales para jóvenesAsesorías laborales para jóvenes
Asesorías laborales para jóvenes
 
McCormick Mobile Media - Mobile Giving
McCormick Mobile Media - Mobile GivingMcCormick Mobile Media - Mobile Giving
McCormick Mobile Media - Mobile Giving
 
05 4 brief españa imt ivia-3murcia
05 4 brief españa imt ivia-3murcia05 4 brief españa imt ivia-3murcia
05 4 brief españa imt ivia-3murcia
 
Student Worker Experience by Anders Selhorst
Student Worker Experience by Anders SelhorstStudent Worker Experience by Anders Selhorst
Student Worker Experience by Anders Selhorst
 
AUX Bootcamp
AUX BootcampAUX Bootcamp
AUX Bootcamp
 
Prototyping: Helping to take away the suck
Prototyping: Helping to take away the suckPrototyping: Helping to take away the suck
Prototyping: Helping to take away the suck
 
Chiapas los-rumbos-de-otra-historia
Chiapas los-rumbos-de-otra-historiaChiapas los-rumbos-de-otra-historia
Chiapas los-rumbos-de-otra-historia
 
Costa Rica Real Estate Opportunities tour, bargains for both self directed IR...
Costa Rica Real Estate Opportunities tour, bargains for both self directed IR...Costa Rica Real Estate Opportunities tour, bargains for both self directed IR...
Costa Rica Real Estate Opportunities tour, bargains for both self directed IR...
 
Fields Letter of Gratitude
Fields Letter of GratitudeFields Letter of Gratitude
Fields Letter of Gratitude
 
Reading john dearden
Reading john deardenReading john dearden
Reading john dearden
 
2014 1 horarios 10 a (1)
2014 1 horarios 10 a (1)2014 1 horarios 10 a (1)
2014 1 horarios 10 a (1)
 
No Smoking
No SmokingNo Smoking
No Smoking
 
WALK INTERVIEW FOR BE in Mechanical/Electrical Engineers
WALK INTERVIEW FOR BE in Mechanical/Electrical Engineers WALK INTERVIEW FOR BE in Mechanical/Electrical Engineers
WALK INTERVIEW FOR BE in Mechanical/Electrical Engineers
 
Estrategias de búsqueda
Estrategias de búsqueda Estrategias de búsqueda
Estrategias de búsqueda
 

Similar a 120620 chred r_presentation2

Tokyor60 r data_science_part1
Tokyor60 r data_science_part1Tokyor60 r data_science_part1
Tokyor60 r data_science_part1Yohei Sato
 
TensorflowとKerasによる深層学習のプログラム実装実践講座
TensorflowとKerasによる深層学習のプログラム実装実践講座TensorflowとKerasによる深層学習のプログラム実装実践講座
TensorflowとKerasによる深層学習のプログラム実装実践講座Ruo Ando
 
TokyoR24 - PerformanceRvsC#
TokyoR24 - PerformanceRvsC#TokyoR24 - PerformanceRvsC#
TokyoR24 - PerformanceRvsC#ta2c
 
Ⅲ. 資料編 2017
Ⅲ. 資料編 2017Ⅲ. 資料編 2017
Ⅲ. 資料編 2017wada, kazumi
 
Gura プログラミング言語の紹介
Gura プログラミング言語の紹介Gura プログラミング言語の紹介
Gura プログラミング言語の紹介Yutaka Saito
 
Matlab演習
Matlab演習 Matlab演習
Matlab演習 noname409
 
ソフトウェア品質技術の歴史を振り返る - ソフトウェア品質測定を中心に -
ソフトウェア品質技術の歴史を振り返る - ソフトウェア品質測定を中心に -ソフトウェア品質技術の歴史を振り返る - ソフトウェア品質測定を中心に -
ソフトウェア品質技術の歴史を振り返る - ソフトウェア品質測定を中心に -Keizo Tatsumi
 
テンソル多重線形ランクの推定法について(Estimation of Multi-linear Tensor Rank)
テンソル多重線形ランクの推定法について(Estimation of Multi-linear Tensor Rank)テンソル多重線形ランクの推定法について(Estimation of Multi-linear Tensor Rank)
テンソル多重線形ランクの推定法について(Estimation of Multi-linear Tensor Rank)Tatsuya Yokota
 
卒業論文発表スライド 分割統治法の拡張
卒業論文発表スライド 分割統治法の拡張卒業論文発表スライド 分割統治法の拡張
卒業論文発表スライド 分割統治法の拡張masakazuyamanaka
 
はじめてのベイズ推定
はじめてのベイズ推定はじめてのベイズ推定
はじめてのベイズ推定Kenta Matsui
 
【Unity道場スペシャル 2017京都】乱数完全マスター 京都編
【Unity道場スペシャル 2017京都】乱数完全マスター 京都編【Unity道場スペシャル 2017京都】乱数完全マスター 京都編
【Unity道場スペシャル 2017京都】乱数完全マスター 京都編Unity Technologies Japan K.K.
 
【Unity道場スペシャル 2017札幌】乱数完全マスター
【Unity道場スペシャル 2017札幌】乱数完全マスター 【Unity道場スペシャル 2017札幌】乱数完全マスター
【Unity道場スペシャル 2017札幌】乱数完全マスター Unity Technologies Japan K.K.
 
8 並列計算に向けた pcセッティング
8 並列計算に向けた pcセッティング8 並列計算に向けた pcセッティング
8 並列計算に向けた pcセッティングTakeshi Takaishi
 
[第2版]Python機械学習プログラミング 第14章
[第2版]Python機械学習プログラミング 第14章[第2版]Python機械学習プログラミング 第14章
[第2版]Python機械学習プログラミング 第14章Haruki Eguchi
 

Similar a 120620 chred r_presentation2 (20)

yamagata m
yamagata myamagata m
yamagata m
 
Tokyor60 r data_science_part1
Tokyor60 r data_science_part1Tokyor60 r data_science_part1
Tokyor60 r data_science_part1
 
Ppt yamagata
Ppt yamagataPpt yamagata
Ppt yamagata
 
TensorflowとKerasによる深層学習のプログラム実装実践講座
TensorflowとKerasによる深層学習のプログラム実装実践講座TensorflowとKerasによる深層学習のプログラム実装実践講座
TensorflowとKerasによる深層学習のプログラム実装実践講座
 
TokyoR24 - PerformanceRvsC#
TokyoR24 - PerformanceRvsC#TokyoR24 - PerformanceRvsC#
TokyoR24 - PerformanceRvsC#
 
HiRoshimaR3_IntroR
HiRoshimaR3_IntroRHiRoshimaR3_IntroR
HiRoshimaR3_IntroR
 
2023_freshman
2023_freshman2023_freshman
2023_freshman
 
Rの高速化
Rの高速化Rの高速化
Rの高速化
 
Ⅲ. 資料編 2017
Ⅲ. 資料編 2017Ⅲ. 資料編 2017
Ⅲ. 資料編 2017
 
Gura プログラミング言語の紹介
Gura プログラミング言語の紹介Gura プログラミング言語の紹介
Gura プログラミング言語の紹介
 
Matlab演習
Matlab演習 Matlab演習
Matlab演習
 
ソフトウェア品質技術の歴史を振り返る - ソフトウェア品質測定を中心に -
ソフトウェア品質技術の歴史を振り返る - ソフトウェア品質測定を中心に -ソフトウェア品質技術の歴史を振り返る - ソフトウェア品質測定を中心に -
ソフトウェア品質技術の歴史を振り返る - ソフトウェア品質測定を中心に -
 
テンソル多重線形ランクの推定法について(Estimation of Multi-linear Tensor Rank)
テンソル多重線形ランクの推定法について(Estimation of Multi-linear Tensor Rank)テンソル多重線形ランクの推定法について(Estimation of Multi-linear Tensor Rank)
テンソル多重線形ランクの推定法について(Estimation of Multi-linear Tensor Rank)
 
卒業論文発表スライド 分割統治法の拡張
卒業論文発表スライド 分割統治法の拡張卒業論文発表スライド 分割統治法の拡張
卒業論文発表スライド 分割統治法の拡張
 
はじめてのベイズ推定
はじめてのベイズ推定はじめてのベイズ推定
はじめてのベイズ推定
 
【Unity道場スペシャル 2017京都】乱数完全マスター 京都編
【Unity道場スペシャル 2017京都】乱数完全マスター 京都編【Unity道場スペシャル 2017京都】乱数完全マスター 京都編
【Unity道場スペシャル 2017京都】乱数完全マスター 京都編
 
【Unity道場スペシャル 2017札幌】乱数完全マスター
【Unity道場スペシャル 2017札幌】乱数完全マスター 【Unity道場スペシャル 2017札幌】乱数完全マスター
【Unity道場スペシャル 2017札幌】乱数完全マスター
 
CAE/SIM meets AI
CAE/SIM meets AICAE/SIM meets AI
CAE/SIM meets AI
 
8 並列計算に向けた pcセッティング
8 並列計算に向けた pcセッティング8 並列計算に向けた pcセッティング
8 並列計算に向けた pcセッティング
 
[第2版]Python機械学習プログラミング 第14章
[第2版]Python機械学習プログラミング 第14章[第2版]Python機械学習プログラミング 第14章
[第2版]Python機械学習プログラミング 第14章
 

Más de Takayuki Nuimura

161104 foss4 g_tokyo_qgis_handson_presentation
161104 foss4 g_tokyo_qgis_handson_presentation161104 foss4 g_tokyo_qgis_handson_presentation
161104 foss4 g_tokyo_qgis_handson_presentationTakayuki Nuimura
 
オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介
オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介
オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介Takayuki Nuimura
 
151012 foss4 g_tokyo_grass7_presentation
151012 foss4 g_tokyo_grass7_presentation151012 foss4 g_tokyo_grass7_presentation
151012 foss4 g_tokyo_grass7_presentationTakayuki Nuimura
 
151009 foss4 g_tokyo_grass7_handson_presentation
151009 foss4 g_tokyo_grass7_handson_presentation151009 foss4 g_tokyo_grass7_handson_presentation
151009 foss4 g_tokyo_grass7_handson_presentationTakayuki Nuimura
 
150828 rihn gis_workshop_handson_presentation
150828 rihn gis_workshop_handson_presentation150828 rihn gis_workshop_handson_presentation
150828 rihn gis_workshop_handson_presentationTakayuki Nuimura
 
150810 ilts workshop_handson_presentation
150810 ilts workshop_handson_presentation150810 ilts workshop_handson_presentation
150810 ilts workshop_handson_presentationTakayuki Nuimura
 
141031 qgisr handson_presentation
141031 qgisr handson_presentation141031 qgisr handson_presentation
141031 qgisr handson_presentationTakayuki Nuimura
 
131107 foss4 g_osaka_grass7_presentation
131107 foss4 g_osaka_grass7_presentation131107 foss4 g_osaka_grass7_presentation
131107 foss4 g_osaka_grass7_presentationTakayuki Nuimura
 
131101 foss4 g_tokyo_grass_shell_presentation
131101 foss4 g_tokyo_grass_shell_presentation131101 foss4 g_tokyo_grass_shell_presentation
131101 foss4 g_tokyo_grass_shell_presentationTakayuki Nuimura
 
131101 foss4 g_tokyo_r_presentation
131101 foss4 g_tokyo_r_presentation131101 foss4 g_tokyo_r_presentation
131101 foss4 g_tokyo_r_presentationTakayuki Nuimura
 
131031 foss4 g_tokyo_grass_handson_presentation
131031 foss4 g_tokyo_grass_handson_presentation131031 foss4 g_tokyo_grass_handson_presentation
131031 foss4 g_tokyo_grass_handson_presentationTakayuki Nuimura
 
130727 nagoyar presentation
130727 nagoyar presentation130727 nagoyar presentation
130727 nagoyar presentationTakayuki Nuimura
 
130622 osc nagoya_presentation
130622 osc nagoya_presentation130622 osc nagoya_presentation
130622 osc nagoya_presentationTakayuki Nuimura
 
130612 ocu lecture_presentation
130612 ocu lecture_presentation130612 ocu lecture_presentation
130612 ocu lecture_presentationTakayuki Nuimura
 
130521 jp gu2013_handson1_presentation
130521 jp gu2013_handson1_presentation130521 jp gu2013_handson1_presentation
130521 jp gu2013_handson1_presentationTakayuki Nuimura
 
130113 os mworkshop_presentation
130113 os mworkshop_presentation130113 os mworkshop_presentation
130113 os mworkshop_presentationTakayuki Nuimura
 
121215 foss4 g_nagoya_qgis_handson
121215 foss4 g_nagoya_qgis_handson121215 foss4 g_nagoya_qgis_handson
121215 foss4 g_nagoya_qgis_handsonTakayuki Nuimura
 
121105 foss4 g_tokyo_qgis_handson
121105 foss4 g_tokyo_qgis_handson121105 foss4 g_tokyo_qgis_handson
121105 foss4 g_tokyo_qgis_handsonTakayuki Nuimura
 
121107 foss4 g_osaka_r_handson_presentation
121107 foss4 g_osaka_r_handson_presentation121107 foss4 g_osaka_r_handson_presentation
121107 foss4 g_osaka_r_handson_presentationTakayuki Nuimura
 
2012 nov foss4g_presentation
2012 nov foss4g_presentation2012 nov foss4g_presentation
2012 nov foss4g_presentationTakayuki Nuimura
 

Más de Takayuki Nuimura (20)

161104 foss4 g_tokyo_qgis_handson_presentation
161104 foss4 g_tokyo_qgis_handson_presentation161104 foss4 g_tokyo_qgis_handson_presentation
161104 foss4 g_tokyo_qgis_handson_presentation
 
オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介
オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介
オープンサイエンスの雪氷学への応用と展望 雪氷研究大会2016 特別セッションの紹介
 
151012 foss4 g_tokyo_grass7_presentation
151012 foss4 g_tokyo_grass7_presentation151012 foss4 g_tokyo_grass7_presentation
151012 foss4 g_tokyo_grass7_presentation
 
151009 foss4 g_tokyo_grass7_handson_presentation
151009 foss4 g_tokyo_grass7_handson_presentation151009 foss4 g_tokyo_grass7_handson_presentation
151009 foss4 g_tokyo_grass7_handson_presentation
 
150828 rihn gis_workshop_handson_presentation
150828 rihn gis_workshop_handson_presentation150828 rihn gis_workshop_handson_presentation
150828 rihn gis_workshop_handson_presentation
 
150810 ilts workshop_handson_presentation
150810 ilts workshop_handson_presentation150810 ilts workshop_handson_presentation
150810 ilts workshop_handson_presentation
 
141031 qgisr handson_presentation
141031 qgisr handson_presentation141031 qgisr handson_presentation
141031 qgisr handson_presentation
 
131107 foss4 g_osaka_grass7_presentation
131107 foss4 g_osaka_grass7_presentation131107 foss4 g_osaka_grass7_presentation
131107 foss4 g_osaka_grass7_presentation
 
131101 foss4 g_tokyo_grass_shell_presentation
131101 foss4 g_tokyo_grass_shell_presentation131101 foss4 g_tokyo_grass_shell_presentation
131101 foss4 g_tokyo_grass_shell_presentation
 
131101 foss4 g_tokyo_r_presentation
131101 foss4 g_tokyo_r_presentation131101 foss4 g_tokyo_r_presentation
131101 foss4 g_tokyo_r_presentation
 
131031 foss4 g_tokyo_grass_handson_presentation
131031 foss4 g_tokyo_grass_handson_presentation131031 foss4 g_tokyo_grass_handson_presentation
131031 foss4 g_tokyo_grass_handson_presentation
 
130727 nagoyar presentation
130727 nagoyar presentation130727 nagoyar presentation
130727 nagoyar presentation
 
130622 osc nagoya_presentation
130622 osc nagoya_presentation130622 osc nagoya_presentation
130622 osc nagoya_presentation
 
130612 ocu lecture_presentation
130612 ocu lecture_presentation130612 ocu lecture_presentation
130612 ocu lecture_presentation
 
130521 jp gu2013_handson1_presentation
130521 jp gu2013_handson1_presentation130521 jp gu2013_handson1_presentation
130521 jp gu2013_handson1_presentation
 
130113 os mworkshop_presentation
130113 os mworkshop_presentation130113 os mworkshop_presentation
130113 os mworkshop_presentation
 
121215 foss4 g_nagoya_qgis_handson
121215 foss4 g_nagoya_qgis_handson121215 foss4 g_nagoya_qgis_handson
121215 foss4 g_nagoya_qgis_handson
 
121105 foss4 g_tokyo_qgis_handson
121105 foss4 g_tokyo_qgis_handson121105 foss4 g_tokyo_qgis_handson
121105 foss4 g_tokyo_qgis_handson
 
121107 foss4 g_osaka_r_handson_presentation
121107 foss4 g_osaka_r_handson_presentation121107 foss4 g_osaka_r_handson_presentation
121107 foss4 g_osaka_r_handson_presentation
 
2012 nov foss4g_presentation
2012 nov foss4g_presentation2012 nov foss4g_presentation
2012 nov foss4g_presentation
 

Último

論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 

Último (10)

論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 

120620 chred r_presentation2

  • 1. R の基本操作 統計解析 時系列データの解析 全球気象データ (NetCDF) の処理 初心者向け R 講座 縫村崇行 (NUIMURA, Takayuki) 環境学・雪氷研究室 R 勉強会 (CHERD) 2012/06/20 T. Nuimura 初心者向け R 講座
  • 2. R の基本操作 統計解析 時系列データの解析 全球気象データ (NetCDF) の処理 Outline 1 R の基本操作 コマンドの入力 グラフ作成 外部データの入出力 2 統計解析 統計処理 検定 3 時系列データの解析 4 全球気象データ (NetCDF) の処理 特定地域の解析 全球での解析 世界地図と相関結果のプロット T. Nuimura 初心者向け R 講座
  • 3. R の基本操作 統計解析 時系列データの解析 全球気象データ (NetCDF) の処理 R の作図例 T. Nuimura 初心者向け R 講座
  • 4. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 R の起動と終了 R の起動 Windows:プログラムメニューから R を選択 Linux:ターミナルで R と入力 (大文字なのに注意) R の終了コマンド > q() # ワークスペースの保存についての質問は No で OK T. Nuimura 初心者向け R 講座
  • 5. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 数値入力と変数 数値の計算 >2+3 [1] 5 >2ˆ8 [1] 256 変数 > temp.dc <- 10 > temp.dc [1] 10 > temp.df <- 9 / 5 * temp.dc + 32 > temp.df [1] 50 T. Nuimura 初心者向け R 講座
  • 6. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 グラフの基礎 (plot 関数) 1 変数のプロット > temp <- c(10, 20, 15, 25, 20, 20) > plot(temp) 25 20 temp 15 10 1 2 3 4 5 6 Index T. Nuimura 初心者向け R 講座
  • 7. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 グラフの基礎 (plot 関数) 2 変数のプロット > year <- c(2000, 2004, 2005, 2007, 2010, 2011) > plot(year, temp) 25 20 temp 15 10 2000 2002 2004 2006 2008 2010 year T. Nuimura 初心者向け R 講座
  • 8. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 グラフの基礎 (plot 関数) 2 変数のプロット > year <- c(2000, 2004, 2005, 2007, 2010, 2011) > plot(year, temp, type=“l”, col=“red”, xlim=c(1990, 2020), ylim=c(0, 30)) 30 25 20 temp 15 10 5 0 1990 1995 2000 2005 2010 2015 2020 year T. Nuimura 初心者向け R 講座
  • 9. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 グラフの基礎 (histogram 関数) ヒストグラムの作成 > hist(temp) Histogram of temp 3.0 2.5 2.0 Frequency 1.5 1.0 0.5 0.0 10 15 20 25 temp T. Nuimura 初心者向け R 講座
  • 10. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 グラフの基礎 (histogram 関数) 大量のデータのヒストグラム > hist(rnorm(10000)) Histogram of rnorm(10000) 1500 Frequency 1000 500 0 −4 −2 0 2 4 rnorm(10000) T. Nuimura 初心者向け R 講座
  • 11. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 グラフの基礎 (histogram 関数) 大量のデータのヒストグラム > hist(rnorm(10000), col=“lightblue”, breaks=100) Histogram of rnorm(10000) 400 300 Frequency 200 100 0 −2 0 2 4 rnorm(10000) T. Nuimura 初心者向け R 講座
  • 12. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 R で取り扱えるデータ 一般的なデータだと xls:csv に変換しといたほうが簡単 csv:簡単に読み込める txt:csv 以外の文字(タブ、スペースなど)区切りデータ dbf:GIS の属性テーブル情報を扱いたいときなど 画像データ:画像処理も 科学関連のデータでは GeoTiff:リモセンデータ Shapefile:GIS データ NetCDF:気候データで一般的 T. Nuimura 初心者向け R 講座
  • 13. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 CSV データ読み込み データのある場所に移動 # Windows: C ドライブの r_lecture フォルダの場合 > setwd(“C:/r_lecture”) # Ubuntu: /home/username/r_lecture フォルダの場合 > setwd(“/home/username/r_lecture”) read.csv 関数 # 月平均気温 (2001–2010) のデータ、 > temp <- read.csv(“nagoya_temp.csv”) T. Nuimura 初心者向け R 講座
  • 14. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 CSV データ加工 matrix 関数で 2 次元配列に変換 > temp.matrix <- matrix(temp[,2], 10, 12, byrow=T) # dim 関数で次元数のチェ ック > dim(temp.matrix) [1] 10 12 T. Nuimura 初心者向け R 講座
  • 15. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 CSV データ出力 2 次元配列の列と行にラベルをつける # 列ラベルに月 > colnames(temp.matrix) <- 1:12 # 行ラベルに年 > rownames(temp.matrix) <- 2001:2010 2 次元配列を CSV に出力 > write.csv(temp.matrix, “temp_matrix.csv”) T. Nuimura 初心者向け R 講座
  • 16. R の基本操作 コマンドの入力 統計解析 グラフ作成 時系列データの解析 外部データの入出力 全球気象データ (NetCDF) の処理 NetCDF データ読み込み RNetCDF パッケージ # パッケージの読み込み > library(RNetCDF) # 今回使用するデータは 5◦ グリッド、 # 1850 Jan.–2011 Oct. の月別気温偏差 > nc <- open.nc(“CRUTEM3.nc”) > nc.data <- var.get.nc(nc, “temp”) # dim 関数で次元数のチェック > dim(nc.data) [1] 72 36 1942 ※次元数はそれぞれ、経度方向 (W180⇒E180)、緯度方向 (S90⇒N90)、時間 (1850 年から 160 年間 ×12 + 10) T. Nuimura 初心者向け R 講座
  • 17. R の基本操作 統計解析 統計処理 時系列データの解析 検定 全球気象データ (NetCDF) の処理 2 次元配列の計算 apply 関数で縦・横それぞれの計算 # 横方向、つまり年別の平均 > apply(temp.matrix, 1, mean) # 縦方向、つまり月別の平均 > apply(temp.matrix, 2, mean) mean 以外にも、sum、max、min、sd、summary なども。 T. Nuimura 初心者向け R 講座
  • 18. R の基本操作 統計解析 統計処理 時系列データの解析 検定 全球気象データ (NetCDF) の処理 t 検定 t.test 関数 # 2001 年と 2010 年の気温差を検定 > t.test(temp.matrix[1,], temp.matrix[10,]) t = -0.1723, df = 22, p-value < 0.8648 # 2001 年と 2010 年では有意な気温差なし # 2001–2010 の 1 月と 2 月の気温差を検定 > t.test(temp.matrix[,1], temp.matrix[,2]) t = -3.1955, df = 15.935, p-value < 0.005654 # 1 月と 2 月では有意な気温差あり T. Nuimura 初心者向け R 講座
  • 19. R の基本操作 統計解析 統計処理 時系列データの解析 検定 全球気象データ (NetCDF) の処理 無相関検定 cor.test 関数 # 2001 年と 2010 年の気温の相関 > cor.test(temp.matrix[1,], temp.matrix[10,]) t = 22.804, df = 10, p-value < 5.93e-10 cor 0.9905215 # 相関係数 0.99 の有意な相関 T. Nuimura 初心者向け R 講座
  • 20. R の基本操作 統計解析 時系列データの解析 全球気象データ (NetCDF) の処理 時系列データの解析の章は保科さんが担当します。 内容 時系列データプロット Download 移動平均 Download 最小二乗法で線形回帰 Download 周波数解析 Download T. Nuimura 初心者向け R 講座
  • 21. R の基本操作 特定地域の解析 統計解析 全球での解析 時系列データの解析 世界地図と相関結果のプロット 全球気象データ (NetCDF) の処理 任意の地域のデータの取り出し 多次元配列データの取り出し方 # 2 次元配列の場合 # temp.matrix から 2003–2006 を抽出 > temp.matrix[3:6,] # 加えて、6–9 月を抽出 > temp.matrix[3:6, 6:9] 3 次元配列 (x, y, time) から、指定領域・期間を抽出するには、 matrix[x 範囲, y 範囲, time 範囲] T. Nuimura 初心者向け R 講座
  • 22. R の基本操作 特定地域の解析 統計解析 全球での解析 時系列データの解析 世界地図と相関結果のプロット 全球気象データ (NetCDF) の処理 meanRange.r スクリプトについて 配布した meanRange.r スクリプトでは 1 抽出する、緯度経度範囲、期間 (1850–2011) の間で指定 2 緯度、経度、年を配列番号に換算 3 NetCDF データから指定範囲・期間を抽出 4 指定範囲内の JJAS 平均を計算 5 計算結果を出力 Download T. Nuimura 初心者向け R 講座
  • 23. R の基本操作 特定地域の解析 統計解析 全球での解析 時系列データの解析 世界地図と相関結果のプロット 全球気象データ (NetCDF) の処理 年輪データと全球グリッドの相関 配布した corGlobal.r スクリプトでは 1 解析する期間 (1850–2011) の間で指定 2 年を配列番号に換算 3 NetCDF データから指定期間を抽出 4 指定範囲内の JJAS 平均を計算 5 年輪データ (CSV) 読み込み 6 グリッドごとに相関を計算 7 計算結果を出力 Download T. Nuimura 初心者向け R 講座
  • 24. R の基本操作 特定地域の解析 統計解析 全球での解析 時系列データの解析 世界地図と相関結果のプロット 全球気象データ (NetCDF) の処理 世界地図と相関結果のプロット 50 0 −50 −150 −100 −50 0 50 100 150 T. Nuimura 初心者向け R 講座