Wednesday, March 25, 2015

Tweets on Mr Lee Kuan Yew before and after his passing.

I have created a project collecting information on social media about Founding Father of Singapore Mr Lee Kuan Yew to find out what are the people tweeting and also who are the people tweeting about it most.

You can use visualization here.

Unfortunately one of the Tableau component is not showing up and leaving a blank space on the right. I will update it when they get back to me. That space was for the information who is the person tweeting it and what he is currently tweeting. Scary huh?

Out of Memory Exception running Java in R


I encounter this problem when I tried to run a function that execute Java to export a dataset from R to xlsx. It seems like its not a good way to export large dataset using the library(xlsx) as it may eat up the java memory. So I do I resolve this?

I have tried running the following command to expand the heap size but it does not work. options(java.parameters = "-Xmx1000m")

The way I found is to use XLConnect library.

Instead of using write.xlsx(myDataset, file = "myfile.xlsx") from the xlsx library, I used library(XLConnect).

writeWorksheetToFile(myFile, data=mydataset, sheet="mySheet")

It has a function to clear the memory, xlcFreeMemory().

If all else fails, try writing to CSV format then convert into xlsx from Excel.