Skip to content

Instantly share code, notes, and snippets.

View wush978's full-sized avatar
👶
Working with my baby

Wush Wu wush978

👶
Working with my baby
View GitHub Profile
@wush978
wush978 / rmd-fullimg.R
Last active August 8, 2017 06:42
Rscript -e "source('<url>')" <html> <css>
argv <- commandArgs(TRUE)
library(XML)
doc <- XML::htmlParse(argv[1])
css.src <- readLines(argv[2])
cls.list <- local({
.m <- regexec("slide\\.(.*) \\{$", css.src)
.p <- Filter(function(x) length(x) > 0, regmatches(css.src, .m))
sapply(.p, "[", 2)
})
for(cls in cls.list) {
//[[Rcpp::plugins(cpp11)]]
#include <Rcpp.h>
using namespace Rcpp;
template<typename T>
T clist(List x, IntegerVector xlength) {
T r(Rcpp::sum(xlength));
auto pr = r.begin();
for(int i = 0;i < x.size();i++) {
const T element(x[i]);
library(Matrix)
library(methods)
for(count in 2) {
m <- lapply(seq_len(count), function(i) {
matrix(seq_len(i * 1000), i * 10, 100)
})
r1 <- do.call(rbind, m)
rm <- lapply(m, as, "RsparseMatrix")
r1 <- as(r1, "RsparseMatrix")
r2 <- as(do.call(rbind, rm), "RsparseMatrix")

以下是參加期末展的須知:

我們參加的是Poster的部分,因此在週一下午當天,會需要在會場外圍張貼A1或A2的Poster。同學需要準備兩件事情:

  1. 參考我參加國際研討會時準備的poster,   把你們的報告改成一頁內可呈現的樣式。你們可以自訂章節,但老師希望你們的內容一定要有:資料來源、收集資料、整理後的資料呈現、結論、自學項目
  2. 準備筆電,到時候可能需要live demo

準備好電子檔(建議給我pdf或google drive link, 否則我可能打不開)之後,可以回信給我你的電子檔,我可以幫忙看有沒有要修改的地方。

{
"data": [
{
"created_time": "2017-05-07T00:44:17+0000",
"story": "Learning By Hacking shared Taiwan R User Group's post.",
"id": "367749100085994_619187774942124"
}
],
"paging": {
"cursors": {
12,327
17,275
23,036
25,315
30,163
34,672
40,549
45,498
52,526
63,398
1
2
3
4
5
@wush978
wush978 / README.md
Last active May 21, 2017 19:15
台大農藝所 2017-05-15 R語言翻轉教室的作業

作業要求

  • DataScienceAndR 中扣除 00-Hello-DataScienceAndR 之外,每一個單元完成可獲得10分。最多100分。

計分說明

  • 於 2017-06-05 00:00:00 之前每完成一個單元的同學可獲得10分
  • 每晚一天完成,該單元的分數會少20%。舉例來說:若同學於期限內完成6個單元,但是於 2017-05-31 21:00:00 再完成4個單元,則分數為 60 + 40 * 0.8 = 92
  • 同學可於 個人紀錄 上查詢進度。老師會以這裡查到的進度為準。同學如果發生完成作業但查不到進度的狀況,請截圖完成的畫面,並儘速通知老師。
# 載入iris資料集
data(iris)
# 請問iris$Species的型態(`class`)是?
answer1 <- class(iris$Species)
stopifnot(is.character(answer1))
stopifnot(length(answer1) == 1)
# 請計算Petal.Length在三種Species的平均值