Theme Song



1 Setting

1.1 SCSS Setup

# install.packages("remotes")
library('BBmisc', 'rmsfuns')
#remotes::install_github("rstudio/sass")
lib('sass')
## sass 
## TRUE
/* https://stackoverflow.com/a/66029010/3806250 */
h1 { color: #002C54; }
h2 { color: #2F496E; }
h3 { color: #375E97; }
h4 { color: #556DAC; }
h5 { color: #92AAC7; }

/* ----------------------------------------------------------------- */
/* https://gist.github.com/himynameisdave/c7a7ed14500d29e58149#file-broken-gradient-animation-less */
.hover01 {
  /* color: #FFD64D; */
  background: linear-gradient(155deg, #EDAE01 0%, #FFEB94 100%);
  transition: all 0.45s;
  &:hover{
    background: linear-gradient(155deg, #EDAE01 20%, #FFEB94 80%);
    }
  }

.hover02 {
  color: #FFD64D;
  background: linear-gradient(155deg, #002C54 0%, #4CB5F5 100%);
  transition: all 0.45s;
  &:hover{
    background: linear-gradient(155deg, #002C54 20%, #4CB5F5 80%);
    }
  }

.hover03 {
  color: #FFD64D;
  background: linear-gradient(155deg, #A10115 0%, #FF3C5C 100%);
  transition: all 0.45s;
  &:hover{
    background: linear-gradient(155deg, #A10115 20%, #FF3C5C 80%);
    }
  }
## https://stackoverflow.com/a/36846793/3806250
options(width = 999)
knitr::opts_chunk$set(class.source = 'hover01', class.output = 'hover02', class.error = 'hover03')


1.2 Setup

suppressPackageStartupMessages(library('BBmisc'))

pkgs <- c('knitr', 'kableExtra', 'devtools', 'lubridate', 'data.table', 'tidyquant', 'stringr', 'magrittr', 'tidyverse', 'plyr', 'dplyr', 'broom', 'highcharter', 'formattable', 'DT', 'httr', 'openxlsx')
suppressAll(lib(pkgs))

#funs <- c('')
#l_ply(funs, function(x) source(paste0('./function/', x)))

Sys.setenv(TZ='Asia/Tokyo')
options(warn=-1)
rm(pkgs)



2 Assignment

2.1 受講生によるテスト:Documentation, Packaging, and Testing

他の受講生の課題をレビューする

課題の提出、お疲れさまでした!これで、他の受講生がレビューできます。成績を受け取るには、他の受講生の課題もいくつかレビューする必要があります。 成績は8月26日 15:59 JSTまでに受け取れるでしょう。

2.1.1 説明

2.1.2 自分の提出物

In this assignment, you will briefly review your some work submitted by your classmates. This is a low-stakes opportunity to get and give some feedback so that everyone can stay on track.

Review criteria

Commit your package to GitHub after you’ve added documentation and tests for your package. You and your peers will grade each other on the following criteria:

  • Does the package contain help files for each function?
  • Are there examples in the help files for each function?
  • Does the package have a NAMESPACE file?
  • Is every function in the package tested?
  • Is every function in the package demonstrated in the vignette?

2.1.3 ディスカッション



4 Peer Review

4.2 ルーブリック

Qualitative feedback is the most important part of this evaluation. Use this space below to let your classmate know how they are doing. Does their project appear to be on the right track? What are its strengths and flaws. Be constructive.

Does the package contain help files for each function?

  • 1点 Yes
  • 0点 No

Are there examples in the help files for each function?

  • 1点 Yes
  • 0点 No

Does the package have a NAMESPACE file?

  • 1点 Yes
  • 0点 No

Is every function in the package tested?

  • 1点 Yes
  • 0点 No

Is every function in the package demonstrated in the vignette?

  • 1点 Yes
  • 0点 No



5 Conclusion

5.1 Summary

5.2 Final Conclude

Awarded on 08 Nov 2021

Final Scores : 100/100

Above png file and feel free to download Coursera 05 - Mastering Software Development in R Capstone.pdf.



6 Appendix

6.1 Blooper

6.2 Documenting File Creation

  • File creation date: 2021-07-28
  • File latest updated date: 2021-12-17
  • R version 4.1.2 (2021-11-01)
  • rmarkdown package version: 2.11
  • File version: 0.2.1
  • Author Profile: ®γσ, ξηg Lιαη Ημ
  • GitHub: Source Code
  • Additional session information:
suppressMessages(require('formattable', quietly = TRUE))
suppressMessages(require('knitr', quietly = TRUE))
suppressMessages(require('kableExtra', quietly = TRUE))

sys1 <- devtools::session_info()$platform |> 
    unlist() |> 
    {\(.) data.frame(row.names = 1:length(.), 
                     Category = names(.), session_info = .)}()

sys2 <- data.frame(Sys.info()) |> 
    {\(.) data.frame(Category = row.names(.), Sys.info = .[,1])}()

#remarks, dim(sys1), dim(sys2)
if (nrow(sys1) == 11 & nrow(sys2) == 8) {
  sys2 <- sys2 |> 
    {\(.) rbind(., data.frame(
    Category = c('rmarkdown', 'rsconnect', 'Current time'), 
    Sys.info = c(as.character(getwd()), 
                 as.character(packageVersion('rsconnect')), 
                 paste(as.character(lubridate::now('Asia/Tokyo')), 'JST 🌏'))))}()
  
} else if (nrow(sys1) == 10 & nrow(sys2) == 8) {
  sys1 %<>% rbind(., data.frame(Category = '', session_info = ''))
  
  sys2 <- sys2 |> 
    {\(.) rbind(., data.frame(
    Category = c('rmarkdown', 'rsconnect', 'Current time'), 
    Sys.info = c(as.character(getwd()), 
                 as.character(packageVersion('rsconnect')), 
                 paste(as.character(lubridate::now('Asia/Tokyo')), 'JST 🌏'))))}()
}

sys <- cbind(sys1, sys2) |> 
  {\(.) 
    kbl(., caption = 'Additional session information:')}() |> 
  {\(.) 
    kable_styling(., bootstrap_options = c('striped', 'hover', 'condensed', 'responsive'))}() |> 
  {\(.) 
    row_spec(., 0, background = 'DimGrey', color = 'yellow')}() |> 
  {\(.) 
    column_spec(., 1, background = 'CornflowerBlue', color = 'red')}() |> 
  {\(.) 
    column_spec(., 2, background = 'grey', color = 'black')}() |> 
  {\(.) 
    column_spec(., 3, background = 'CornflowerBlue', color = 'blue')}() |> 
  {\(.) 
    column_spec(., 4, background = 'grey', color = 'white')}() |> 
  {\(.) 
    row_spec(., 11, bold = TRUE, color = 'yellow', background = '#D7261E')}()

rm(sys1, sys2)
sys
Additional session information:
Category session_info Category Sys.info
version R version 4.1.2 (2021-11-01) sysname Linux
os Ubuntu 20.04.3 LTS release 5.15.7-051507-generic
system x86_64, linux-gnu version #202112081053-Ubuntu SMP Wed Dec 8 11:10:32 UTC 2021
ui X11 nodename Scibrokes-Trading
language en machine x86_64
collate en_US.UTF-8 login englianhu
ctype en_US.UTF-8 user englianhu
tz Asia/Tokyo effective_user englianhu
date 2021-12-17 rmarkdown /home/englianhu/Documents/GitHub/Coursera-Mastering-Software-Development-in-R/05 Mastering Software Development in R Capstone
pandoc 2.14.0.3 @ /usr/lib/rstudio/bin/pandoc/ (via rmarkdown) rsconnect 0.8.25
Current time 2021-12-17 06:54:12 JST 🌏