using read.csv to read csv file from website
using read.csv to read csv file from website
title=readLines("http://www.twse.com.tw/exchangeReport/STOCK_DAY_ALL?response=csv")[1]
x=read.csv("http://www.twse.com.tw/exchangeReport/STOCK_DAY_ALL?response=csv",skip=1)
x=read.csv("http://www.twse.com.tw/exchangeReport/STOCK_DAY_ALL?response=csv",skip=1)
print 20 entries for example
library(knitr)
cat(title)
cat(title)
## "106年11月03日 當日日成交資訊 (股)"
kable(x[200:220,1:10])
| 
證券代號 | 
證券名稱 | 
成交股數 | 
成交金額 | 
開盤價 | 
最高價 | 
最低價 | 
收盤價 | 
漲跌價差 | 
成交筆數 | |
| 
200 | 
1470 | 
大統染 | 
0 | 
0 | 
0.00 | 
0.00 | 
0.00 | 
0.00 | 
0.00 | 
0 | 
| 
201 | 
1471 | 
首利 | 
272,683 | 
1,325,502 | 
4.95 | 
4.95 | 
4.84 | 
4.87 | 
+0.02 | 
103 | 
| 
202 | 
1472 | 
三洋紡 | 
109,829 | 
4,202,152 | 
38.20 | 
39.70 | 
37.90 | 
38.15 | 
-0.05 | 
88 | 
| 
203 | 
1473 | 
台南 | 
52,100 | 
1,220,694 | 
23.50 | 
23.50 | 
23.40 | 
23.45 | 
0.00 | 
37 | 
| 
204 | 
1474 | 
弘裕 | 
155,919 | 
1,817,005 | 
11.60 | 
11.70 | 
11.60 | 
11.65 | 
+0.05 | 
31 | 
| 
205 | 
1476 | 
儒鴻 | 
782,081 | 
270,389,640 | 
343.00 | 
349.00 | 
341.00 | 
347.50 | 
+4.50 | 
774 | 
| 
206 | 
1477 | 
聚陽 | 
621,419 | 
86,230,822 | 
139.00 | 
139.50 | 
137.00 | 
139.00 | 
0.00 | 
509 | 
| 
207 | 
1503 | 
士電 | 
28,224 | 
1,163,438 | 
41.30 | 
41.30 | 
41.20 | 
41.20 | 
-0.15 | 
46 | 
| 
208 | 
1504 | 
東元 | 
1,369,304 | 
38,339,889 | 
28.05 | 
28.10 | 
27.90 | 
28.10 | 
+0.05 | 
673 | 
| 
209 | 
1506 | 
正道 | 
912,590 | 
20,158,505 | 
21.25 | 
22.55 | 
21.05 | 
22.45 | 
+1.20 | 
477 | 
| 
210 | 
1507 | 
永大 | 
918,603 | 
55,097,610 | 
59.60 | 
60.20 | 
59.60 | 
60.10 | 
+0.70 | 
632 | 
| 
211 | 
1512 | 
瑞利 | 
2,431,283 | 
32,834,455 | 
13.50 | 
13.70 | 
13.20 | 
13.45 | 
-0.05 | 
601 | 
| 
212 | 
1513 | 
中興電 | 
1,602,915 | 
33,769,556 | 
21.25 | 
21.30 | 
20.95 | 
21.00 | 
-0.15 | 
572 | 
| 
213 | 
1514 | 
亞力 | 
572,001 | 
6,260,561 | 
10.90 | 
11.05 | 
10.90 | 
10.90 | 
0.00 | 
165 | 
| 
214 | 
1515 | 
力山 | 
3,245,580 | 
221,362,420 | 
69.10 | 
69.40 | 
67.20 | 
68.00 | 
0.00 | 
1,712 | 
| 
215 | 
1516 | 
川飛 | 
44,790 | 
688,195 | 
15.30 | 
15.60 | 
15.25 | 
15.60 | 
+0.20 | 
23 | 
| 
216 | 
1517 | 
利奇 | 
239,630 | 
3,021,620 | 
12.75 | 
12.75 | 
12.55 | 
12.60 | 
-0.05 | 
132 | 
| 
217 | 
1519 | 
華城 | 
322,000 | 
6,175,800 | 
19.40 | 
19.40 | 
19.05 | 
19.15 | 
-0.25 | 
159 | 
| 
218 | 
1521 | 
大億 | 
67,337 | 
5,472,331 | 
81.30 | 
81.40 | 
81.10 | 
81.40 | 
-0.10 | 
50 | 
| 
219 | 
1522 | 
堤維西 | 
6,767,632 | 
240,120,307 | 
35.15 | 
35.75 | 
35.00 | 
35.70 | 
+0.60 | 
2,884 | 
| 
220 | 
1524 | 
耿鼎 | 
523,009 | 
5,988,252 | 
11.50 | 
11.50 | 
11.35 | 
11.45 | 
0.00 | 
169 |