2016年7月23日 星期六

2016年7月14日 星期四

R 相關參考資料


資料視覺化

[1] Teutonico, D., ggplot2 Essentials, Packt Publishing, 2015. (Comment: ggplot2 的入門書,對  grammar of graphics 有清楚的解釋)[Packt Publishing][天瓏]
[2]  Data Visualization with ggplot2: Cheat Sheet, R Studio. (ggplot2 的 cheat sheet, 讓你一目了然)
[3] Data Visualization: When To Use Which Graph (介紹各種圖形的使用時機)
[4] 資料視覺化 (整理、搜集及實驗各式各樣的資料視覺化 / 資訊圖表以及他們的相關資訊,以中文的方式提供給華人社群)
[5] ggplot 官方網站 (http://ggplot.yhathq.com/) 提供 ggplot 的使用說明, 非常的詳盡.  (*****)
[6] ggplot2 官方網站
[7] Cookbook for R
[8] Trina Chiasson、Dyanna Gregory, 資料準備與視覺化的簡單入門.
[9] Scales, axes and legends  介紹 ggplot2 中的 Scale, Axes 及  Legends 的觀念及實作.

統計

(介紹資料非常態分配時的原因及不需非常態分配的檢定工具)
[2] Power of a hypothesis test, University of Melbourne (想要知道樣本數及檢定效果如何影響檢定的 power 嗎? 這個網站提供了動畫, 讓你動手試試看)


Data Cleaning

[1] Erhard Rahm∗ Hong Hai Do, Data Cleaning: Problems and Current Approaches.
[2] Edwin de Jonge, Mark van der Loo, 2013.  An introduction to data cleaning with R, Statistics Netherlands.
[3] 劉正山、莊文忠, 2013. 項目無反應資料的多重插補分析,  臺灣選舉與民主化調查(TEDS)方法論之回顧與前瞻 .

Data Mining

[1] Daniel T. Larose And Chantal D. Larose, Data mining and predictive analytics,  2nd edition, John Wiley & Sons, 2015 

2016年6月28日 星期二

Primefaces FontAwesome 中的 mime-type 設定

使用 primefaces 中的 FontAwesome 時,要加入以下的 mine-type 至 web.xml 檔案中:


    <mime-mapping>
        <extension>eot</extension>
        <mime-type>application/vnd.ms-fontobject</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>otf</extension>
        <mime-type>font/opentype</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ttf</extension>
        <mime-type>application/x-font-ttf</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>woff</extension>
        <mime-type>application/x-font-woff</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>svg</extension>
        <mime-type>image/svg+xml</mime-type>
    </mime-mapping>
    <mime-mapping>
        <extension>ico</extension>
        <mime-type>image/x-icon</mime-type>
    </mime-mapping>
    <mime-mapping>  
        <extension>woff2</extension>  
        <mime-type>application/x-font-woff2</mime-type>  
    </mime-mapping>
否則會產生警告訊息。

參考資料:http://forum.primefaces.org/viewtopic.php?f=3&t=42002

2016年5月21日 星期六

2016年5月12日 星期四

使用 R 匯入 Excel 存成的 CSV 檔, 在 Windows 環境下

Excel 的內容存成 CSV 檔時, 若在 Windows 環境下會存成 Big5 (CP-950)編碼。

使用 read.table() 指令讀取 CSV 檔時,若 R 的 coding page 不是 CP-950, 則匯入的中文字會編成亂碼。

使用 l10_info() 指令來看 R 的 coding page.





若不是 CP-950, 使用指令  Sys.setlocale(category="LC_ALL", locale = "cht") 切換。


讀入 CVS 讀時, 不要再加 encoding="UTF-8" 選項。雖然我們在 R-Studio 中設定存 Default Text Encoding 選項為 UTF-8,這個選項是指存檔時的編碼。在 R 中還是使用 CP-950 編碼。



延伸閱讀