This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Deep Censored Quantile Regression" | |
author: "Wush Wu" | |
date: "September 7, 2018" | |
output: ioslides_presentation | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = FALSE) | |
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Rcpp.h> | |
#include <thread> | |
using namespace Rcpp; | |
//[[Rcpp::export]] | |
void testInterrupt(const int jsize, bool verbose, const int out_index = 0) { | |
std::ostream* pout; | |
if (out_index == 0) pout = &Rcout; | |
else if (out_index == 1) pout = &std::cout; | |
else throw std::invalid_argument("out"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(magrittr) | |
library(RSQLite) | |
library(parallel) | |
library(dplyr) | |
library(data.table) | |
.tbs <- dbListTables(db) %>% | |
grep(pattern = "^cem_", value = TRUE) | |
cl <- makeCluster(length(.tbs)) | |
init.cluster <- function(cl) { | |
parallel:::checkCluster(cl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jenkins ALL=(ALL) NOPASSWD:ALL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
argv <- commandArgs(TRUE) | |
pkgs <- strsplit(argv, ",")[[1]] | |
installed.pkgs <- dir(.libPaths()[1]) | |
for(pkg in pkgs) { | |
if (pkg %in% installed.pkgs) next | |
utils::install.packages(pkg, lib = .libPaths()[1]) | |
} |
這次的作業希望讓同學能準備做期末專題,所以將圍繞著老師給同學的示範專題作練習。 請同學先重現 http://homepage.ntu.edu.tw/~wush978/rdataengineer/demo.html 中的分析結果之後,應該要具備以下的幾個變數:
cec.df
ias.df
join.df
老師希望同學能透過和資料互動,回答以下的問題:
- 為什麼有些資料比對不到?(1%)
- 在政府資料開放平台上搜尋:「綜合所得稅各類所得金額各縣市鄉鎮村里統計表-縣市別」,可以得到一個彙整搜尋結果的檔案:
- 請處理這個檔案,得到每個縣市的下載連結
- 請在R中寫迴圈下載22個檔案
- 安裝R,用Windows的同學請安裝Rstudio
- 按照以下的指引安裝R語言翻轉教室與NTUR02
- 輸入
source("http://homepage.ntu.edu.tw/~wush978/R/init-swirl.R")
或source("https://wush978.github.io/R/init-swirl.R")
來安裝安裝R語言翻轉教室,細節可以參考安裝指引 - 輸入
swirl::install_course_url("http://homepage.ntu.edu.tw/~wush978/R/course/NTUR02.zip")
來安裝NTUR02。這個步驟每週都要更新。
- 輸入
- 收信
- 請確認你的信箱(
<學號>@ntu.edu.tw
或你登錄在ceiba上的信箱)有收到老師寄的標題為:[R程式語言與資料處理]作業帳號密碼
的信- 信中有
classroom
帳號的帳號密碼
- 信中有
- 請確認你的信箱(
- 作業請用
classroom
帳號完成,我才知道你是誰