R on Yin-Ting Chou
http://yintingchou.com/categories/r/
Recent content in R on Yin-Ting ChouHugo -- gohugo.ioyintingchou@gmail.com (Yin-Ting Chou)yintingchou@gmail.com (Yin-Ting Chou)Thu, 16 Nov 2017 00:00:00 +0000Parallel Computing in R
http://yintingchou.com/posts/parallel-computing-in-r/
Thu, 16 Nov 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/parallel-computing-in-r/In my work, I usually deal with dataset of products from different customers across different market places. Basically, each product has its own time series dataset. The size of each dataset is not big but we have millions of them. Before finding any convincing reasons to combine dataset from different products, now we just treat them all as independent dataset. And, since they are all independent, it is definitely a good idea to use parallel computing to push the limit of our machine and to make code executed efficiently.Connect SQL Server Database to R
http://yintingchou.com/posts/connect-sql-server-database-to-r/
Sun, 15 Oct 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/connect-sql-server-database-to-r/When I am working on my personal projects, all the data I have can be easily saved as .csv or .txt files. Things are not complicated. However, when things are in scale, it is hard to not to talk about database. In my company, all the data are stored in SQL Server database. So, it is important for me to know how to connect R with SQL Server. And, also good to know how to interact with database in R by passing variables in R environment to database and then return the desired dataset.ioslides vs. Slidify in R Markdown Presentation
http://yintingchou.com/posts/ioslides-vs-slidify-in-r-markdown-presentation/
Fri, 26 May 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/ioslides-vs-slidify-in-r-markdown-presentation/The Github repository for this website : choux130/slide_thesis_ioslides. The link to my slides : https://choux130.github.io/slide_thesis_ioslides/#1
Having an opportunity to give a presentation for my master thesis, I decided to give it a try on R Markdown Presentation with interactive graphs and planned to publish it online after the presentation. There are three main choices in R Studio for the R Markdown Presentation: ioslides, Slidy, and Beamer. Beamer is for .pdf file which cannot show the interactive graphs and not meets my need for this time.R --- LDA and QDA
http://yintingchou.com/posts/r-lda-and-qda/
Mon, 13 Mar 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/r-lda-and-qda/This post shows the R code for LDA and QDA by using funtion lda() and qda() in package MASS. To show how to use these function, I created a function, bvn(), to generate bivariate normal dataset based on the assumptions and then used lda() and qda() on the generated datasets.
Details Resources for Package ‘MASS’ CRAN - Package ‘MASS’ Package ‘MASS’ - Reference manual Example Code LDA : Suppose our dataset are from \[X_{green}=N(\begin{pmatrix} 0.R --- Naive Bayes Classifier
http://yintingchou.com/posts/r-naive-bayes-classifier/
Sun, 12 Feb 2017 00:00:00 +0000yintingchou@gmail.com (Yin-Ting Chou)http://yintingchou.com/posts/r-naive-bayes-classifier/This post shows the R code for Naive Bayes Classifier by using funtion naiveBayes() in package e1071. And I use the simple example in my post, Naive Bayes Classifier, to show how to use this function.
Details Resources for Package ‘e1071’ CRAN - Package ‘e1071’ Package ‘e1071’ - Reference manual Example Code (e1071::naiveBayes()) Suppose we have a contingency table like this: Q : And, what will be our guess on type if we have a data has X1=“Yes” and X2=“Unsure”?