SlideShare une entreprise Scribd logo
1  sur  24
Télécharger pour lire hors ligne
R


 (NetCDF)




            R

    Takayuki NUIMURA




        30th Nov. 2011




Takayuki NUIMURA   R
R


            (NetCDF)


Outline

  1   R




  2




  3

  4       (NetCDF)




           Takayuki NUIMURA   R
R


     (NetCDF)


R




    Takayuki NUIMURA   R
R


                       (NetCDF)


R



    R
            Windows                          R
            Linux             R          (                 )

    R
    > q()
    #                                            No   OK




                      Takayuki 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

                     Takayuki 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




                           Takayuki 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




                          Takayuki 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




                          Takayuki 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




                              Takayuki NUIMURA               R
R


                                      (NetCDF)


              (histogram                                         )


> hist(rnorm(10000))


                                                 Histogram of rnorm(10000)
                               1500
                   Frequency

                               1000
                               500
                               0




                                            −4   −2          0         2     4

                                                        rnorm(10000)




                               Takayuki 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)




                               Takayuki NUIMURA                      R
R


                       (NetCDF)


R


    xls   csv
    csv
    txt   csv
    dbf   GIS




    GeoTiff
    Shapefile    GIS
    NetCDF

                      Takayuki 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”)




                     Takayuki NUIMURA      R
R


                       (NetCDF)


CSV




 matrix       2
 > temp.matrix <- matrix(temp[,2], 10, 12, byrow=T)

 # dim
 > dim(temp.matrix)
 [1] 10 12




                      Takayuki 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”)




                     Takayuki 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)
                       Takayuki NUIMURA     R
R


                          (NetCDF)


2




    apply
    #
    > apply(temp.matrix, 1, mean)

    #
    > apply(temp.matrix, 2, mean)

    mean            sum    max       min   sd   summary




                        Takayuki 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




                          Takayuki 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




                     Takayuki NUIMURA   R
R


            (NetCDF)




                        Download


Download


                        Download


   Download




           Takayuki 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         ]




                       Takayuki NUIMURA   R
R


                        (NetCDF)


meanRange.r



              meanRange.r
   1                                          (1850–2011)
   2


   3   NetCDF
   4                 JJAS
   5


   Download




                       Takayuki NUIMURA   R
R


                          (NetCDF)




           corGlobal.r
1                   (1850–2011)
2


3   NetCDF
4                   JJAS
5                 (CSV)
6


7


Download




                         Takayuki NUIMURA   R
R


              (NetCDF)




50
0
−50




      −150      −100     −50    0       50   100   150




             Takayuki NUIMURA       R

Contenu connexe

Similaire à 111130 r lecture_presentation

Original Opto PC816 EL816 LTV816 LTV-816 816C 816 DIP-4 New
Original Opto PC816 EL816 LTV816 LTV-816 816C 816 DIP-4 NewOriginal Opto PC816 EL816 LTV816 LTV-816 816C 816 DIP-4 New
Original Opto PC816 EL816 LTV816 LTV-816 816C 816 DIP-4 NewAUTHELECTRONIC
 
Samsung 1.8 inch AMOLED(128x60) Datasheet
Samsung 1.8 inch AMOLED(128x60) DatasheetSamsung 1.8 inch AMOLED(128x60) Datasheet
Samsung 1.8 inch AMOLED(128x60) DatasheetPanox Display
 
Mechanistic Empirical Pavement Design
Mechanistic Empirical Pavement Design Mechanistic Empirical Pavement Design
Mechanistic Empirical Pavement Design mecocca5
 
Ink jet rheology and processing-Monash 2009
Ink jet rheology and processing-Monash 2009Ink jet rheology and processing-Monash 2009
Ink jet rheology and processing-Monash 2009malcolmmackley
 
10 range and doppler measurements in radar systems
10 range and doppler measurements in radar systems10 range and doppler measurements in radar systems
10 range and doppler measurements in radar systemsSolo Hermelin
 
QR Factorizations and SVDs for Tall-and-skinny Matrices in MapReduce Architec...
QR Factorizations and SVDs for Tall-and-skinny Matrices in MapReduce Architec...QR Factorizations and SVDs for Tall-and-skinny Matrices in MapReduce Architec...
QR Factorizations and SVDs for Tall-and-skinny Matrices in MapReduce Architec...Austin Benson
 
Quartz Crystal Oscillators and Phase-Locked Loops
Quartz Crystal Oscillators and Phase-Locked LoopsQuartz Crystal Oscillators and Phase-Locked Loops
Quartz Crystal Oscillators and Phase-Locked LoopsADVA
 
1 radar signal processing
1 radar signal processing1 radar signal processing
1 radar signal processingSolo Hermelin
 
Theta join (M-bucket-I algorithm explained)
Theta join (M-bucket-I algorithm explained)Theta join (M-bucket-I algorithm explained)
Theta join (M-bucket-I algorithm explained)Minsub Yim
 
Lc серия Бонфиглиоли
Lc серия БонфиглиолиLc серия Бонфиглиоли
Lc серия БонфиглиолиArve
 
Time series-mining-slides
Time series-mining-slidesTime series-mining-slides
Time series-mining-slidesYanchang Zhao
 
Trends in Future CommunicationsInternational Workshop - Renato Rabelo
Trends in Future CommunicationsInternational Workshop - Renato RabeloTrends in Future CommunicationsInternational Workshop - Renato Rabelo
Trends in Future CommunicationsInternational Workshop - Renato RabeloCPqD
 

Similaire à 111130 r lecture_presentation (20)

08 fouri
08 fouri08 fouri
08 fouri
 
Original Opto PC816 EL816 LTV816 LTV-816 816C 816 DIP-4 New
Original Opto PC816 EL816 LTV816 LTV-816 816C 816 DIP-4 NewOriginal Opto PC816 EL816 LTV816 LTV-816 816C 816 DIP-4 New
Original Opto PC816 EL816 LTV816 LTV-816 816C 816 DIP-4 New
 
Samsung 1.8 inch AMOLED(128x60) Datasheet
Samsung 1.8 inch AMOLED(128x60) DatasheetSamsung 1.8 inch AMOLED(128x60) Datasheet
Samsung 1.8 inch AMOLED(128x60) Datasheet
 
Mechanistic Empirical Pavement Design
Mechanistic Empirical Pavement Design Mechanistic Empirical Pavement Design
Mechanistic Empirical Pavement Design
 
Ink jet rheology and processing-Monash 2009
Ink jet rheology and processing-Monash 2009Ink jet rheology and processing-Monash 2009
Ink jet rheology and processing-Monash 2009
 
Oil Prices Data Analysis - R
Oil Prices Data Analysis - ROil Prices Data Analysis - R
Oil Prices Data Analysis - R
 
Pipeline hydraulic calculation
Pipeline hydraulic calculationPipeline hydraulic calculation
Pipeline hydraulic calculation
 
Ltn173 kt01 c01
Ltn173 kt01 c01Ltn173 kt01 c01
Ltn173 kt01 c01
 
10 range and doppler measurements in radar systems
10 range and doppler measurements in radar systems10 range and doppler measurements in radar systems
10 range and doppler measurements in radar systems
 
QR Factorizations and SVDs for Tall-and-skinny Matrices in MapReduce Architec...
QR Factorizations and SVDs for Tall-and-skinny Matrices in MapReduce Architec...QR Factorizations and SVDs for Tall-and-skinny Matrices in MapReduce Architec...
QR Factorizations and SVDs for Tall-and-skinny Matrices in MapReduce Architec...
 
MTH R404A condensing unit 220V
MTH R404A condensing unit 220VMTH R404A condensing unit 220V
MTH R404A condensing unit 220V
 
Database slide
Database slideDatabase slide
Database slide
 
Quartz Crystal Oscillators and Phase-Locked Loops
Quartz Crystal Oscillators and Phase-Locked LoopsQuartz Crystal Oscillators and Phase-Locked Loops
Quartz Crystal Oscillators and Phase-Locked Loops
 
1 radar signal processing
1 radar signal processing1 radar signal processing
1 radar signal processing
 
11750882_01.PDF
11750882_01.PDF11750882_01.PDF
11750882_01.PDF
 
nfc
nfcnfc
nfc
 
Theta join (M-bucket-I algorithm explained)
Theta join (M-bucket-I algorithm explained)Theta join (M-bucket-I algorithm explained)
Theta join (M-bucket-I algorithm explained)
 
Lc серия Бонфиглиоли
Lc серия БонфиглиолиLc серия Бонфиглиоли
Lc серия Бонфиглиоли
 
Time series-mining-slides
Time series-mining-slidesTime series-mining-slides
Time series-mining-slides
 
Trends in Future CommunicationsInternational Workshop - Renato Rabelo
Trends in Future CommunicationsInternational Workshop - Renato RabeloTrends in Future CommunicationsInternational Workshop - Renato Rabelo
Trends in Future CommunicationsInternational Workshop - Renato Rabelo
 

Plus de Takayuki 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_handson2_presentation
130521 jp gu2013_handson2_presentation130521 jp gu2013_handson2_presentation
130521 jp gu2013_handson2_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
 

Plus de Takayuki Nuimura (20)

オープンサイエンスの雪氷学への応用と展望 雪氷研究大会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_handson2_presentation
130521 jp gu2013_handson2_presentation130521 jp gu2013_handson2_presentation
130521 jp gu2013_handson2_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
 

Dernier

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

111130 r lecture_presentation

  • 1. R (NetCDF) R Takayuki NUIMURA 30th Nov. 2011 Takayuki NUIMURA R
  • 2. R (NetCDF) Outline 1 R 2 3 4 (NetCDF) Takayuki NUIMURA R
  • 3. R (NetCDF) R Takayuki NUIMURA R
  • 4. R (NetCDF) R R Windows R Linux R ( ) R > q() # No OK Takayuki 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 Takayuki 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 Takayuki 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 Takayuki 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 Takayuki 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 Takayuki 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) Takayuki 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) Takayuki NUIMURA R
  • 12. R (NetCDF) R xls csv csv txt csv dbf GIS GeoTiff Shapefile GIS NetCDF Takayuki 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”) Takayuki NUIMURA R
  • 14. R (NetCDF) CSV matrix 2 > temp.matrix <- matrix(temp[,2], 10, 12, byrow=T) # dim > dim(temp.matrix) [1] 10 12 Takayuki 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”) Takayuki 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) Takayuki NUIMURA R
  • 17. R (NetCDF) 2 apply # > apply(temp.matrix, 1, mean) # > apply(temp.matrix, 2, mean) mean sum max min sd summary Takayuki 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 Takayuki 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 Takayuki NUIMURA R
  • 20. R (NetCDF) Download Download Download Download Takayuki 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 ] Takayuki NUIMURA R
  • 22. R (NetCDF) meanRange.r meanRange.r 1 (1850–2011) 2 3 NetCDF 4 JJAS 5 Download Takayuki NUIMURA R
  • 23. R (NetCDF) corGlobal.r 1 (1850–2011) 2 3 NetCDF 4 JJAS 5 (CSV) 6 7 Download Takayuki NUIMURA R
  • 24. R (NetCDF) 50 0 −50 −150 −100 −50 0 50 100 150 Takayuki NUIMURA R