• Tidak ada hasil yang ditemukan

Pengantar Reproducible Research Menggunakan R

N/A
N/A
Protected

Academic year: 2023

Membagikan "Pengantar Reproducible Research Menggunakan R"

Copied!
26
0
0

Teks penuh

(1)

Pengantar Reproducible Research Menggunakan R Pengantar Reproducible Research Menggunakan R

Firman Hadi

Firman Hadi

19 Mei 2022

19 Mei 2022

(2)

Who am I?

Firman Hadi

Staf pengajar Departemen Teknik Geodesi, Fakultas Teknik, Universitas Diponegoro Quality Panel, High Conversation Value Resource Network

"Presiden" OSGEO Indonesia

Catatan, rekaman video tutorial dan kursus dapat dilihat di https://firmanhadi.github.io dan https://sigro.id

(3)

Disclaimer

Saya bukan seorang ahli statistik.

Saya tidak mahir menggunakan R.

Saya tidak menguasai pemrograman.

Saya hanya "yesterday afternoon son" (Soeharmono, 2021) dan seorang "konsultan" .

(4)

On being a consultant

(5)

Aims

Pengalaman adalah guru yang terbaik.

Belajar dari pengalaman adalah metode belajar yang terbaik.

Apakah ada yang lebih baik dari itu?

Belajar dari orang yang berpengalaman . Tujuan sesi ini adalah berbagi pengalaman .

(6)

Reproducible research

Research is considered to be reproducible when the exact results can be reproduced if given access to the original data, software, or code. Reproducible research is sometimes known as reproducibility,

reproducible statistical analysis, reproducible data analysis, reproducible reporting, and literate programming.

(7)

Reproducible research at UNDIP

(8)

Reproducible research at UNDIP

(9)

Reproducible research at UNDIP

(10)

How did I use to write?

First, with Excel + Word, I was ...

frustrated with Word

formatting tables, figures, citations, and equations managing references

tired of switching between programmes/screens and, worried about making mistakes in between used the illegal version

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(11)

Then, with OpenOffice + R + LaTeX, I was ...

frustrated with Word

formatting tables, figures, citations, and equations managing references

used the illegal versione

tired of switching between programmes/screens and, worried about making mistakes in between converting PDF documents to Word manually

coordinating work with co-authors who don't use LaTeX/PDF

submitting to journals which don't accept LaTeX/PDF

{width=20%}

How did I use to write?

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(12)

How do I write now?

Now, with R Markdown, I am ... happy!

frustrated with Word

formatting tables, figures, citations, and equations managing references

tired of switching between programmes/screens and, worried about making mistakes in between used the illegal versione

converting PDF documents to Word, manually

coordinating work with co-authors who don't use LaTeX/PDF submitting to journals which don't accept LaTeX/PDF

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(13)

R Markdown

Efficient

write text, cite sources, tidy data, analyse, table, and plot it in one programme/screen re-do one, more, or all of these with ease

decrease the possibility of making mistakes in the process Flexible

output to various formats

e.g., HTML, LaTeX, PDF, Word Open access/source

use for free

create documents accessible to anyone with a computer and internet connection benefit from the work of a great community of users/developers

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(14)

Reproducibility — Before Publication

Having written a complete draft

with data including re-coded variables, tables, figures, and text with references to specific results (e.g., numbers from summary and/or regression statistics)

If you and/or your co-authors decide

to reverse a re-coded variable to its previous/original measure and/or, to exclude a subgroup of observations from analysis How resource intensive would this revision be?

how long would this revision take?

how many programmes would be needed for this revision, and how much would they cost?

there is an inverse relationship between this resource intensity and reproducibilty

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(15)

Reproducibility — After Publication

After your paper is published, if others, including your future self, would like to test how robust the results are

to reversing a re-coded variable to its previous/original measure and/or, to excluding a subgroup of observations from analysis How resource intensive would this test be?

how accessible is the data, documentation (how was the variable re-coded in the first place?), and the code?

how long would the test take?

how many programmes would be needed for this revision, and how much would they cost?

there is an inverse relationship between this resource intensity and reproducibilty

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(16)

Observe also that the document has three components YAML

R Markdown Document — Components

(17)

Observe also that the document has three components YAML

text

R Markdown Document — Components

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(18)

Observe also that the document has three components YAML

text

code chunks

R Markdown Document — Components

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(19)

Click the button to compile your .Rmd document, and observe that

the output document has the same name as your .Rmd document

You may want to delete these newly created files, as we will work with instead to save time.

R Markdown Document — Compile

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(20)

becomes (Bennett, 2015) becomes Bennett (2015)

becomes (2015) becomes 2015

becomes (Bennett, 2015, p.

35)

becomes (Bennett, 2015, pp. 33–35)

becomes (Bennett, 2015, ch. 1)

becomes (Bennett, 2015; Gilbert, 2019)

becomes (see Bennett, 2015, for details)

becomes Bennett (2015, pp. 33–35)

References — In-text Citation Syntax — Author-Date Styles *

All citations keys take the 'at' sign @ while square brackets and/or minus signs introduce variation

* Specifically, the outputs on this slide are formatted according to the APA 7th edition.

(Resul Umit, 2020) [https://github.com/resulumit/rmd_workshop]

(21)
(22)
(23)
(24)
(25)

Demonstration

(26)

Terima kasih atas Bapak/Ibu sekalian.

Referensi

Dokumen terkait

THE INFLUENCE OF TRANSFORMATIONAL LEADERSHIP STYLE AND WORKING ENVIRONMENT TOWARDS EMPLOYEE WORKING MOTIVATION IN PT CLIPAN FINANCE INDONESIA TBK By: Nicolas Alvin 11403117

Transition signals have function to introduce an additional idea, an opposite idea or contrast, choice or alternative, restatement or explanation, list in order, example, conclusion or