Monday, April 28, 2014

How easy it is to create an R package?

I did not know until I found this video today. Rstudio and its sibling packages have really changed the way how people use R!

10 Funny Jokes In Pictures: Windows Vs Mac Vs Linux

Here they are.

Saturday, April 26, 2014

Friday, April 25, 2014

My desktop

The new version (14.04) is really good!

Monday, April 07, 2014

Play with C++ code in Rstudio

I am not a C++ programmer but sometimes I need to play with some C++ code. On my Linux workstation, I have the complete GNU tool chain installed. I don't really want to do that on my tiny Windows ultrabook because ... well, it's tiny and I want to keep it that way.

I do have R (and the magical Rcpp package), Rtools, and Rstudio installed on my ultrabook. I just realized how trivial it is to tweak C++ code fragments using these tools together.

For example, in order to run this very simple C++ code fragment:

===========================================
#include <iostream>
using std::cout;

int main() {
for (int hashNum = 1; hashNum <= 5; hashNum++) {
cout << "#";
}
cout << "\n";
return 0;
}
===========================================

One just need to add a few lines so that the code looks like this:

===========================================
#include <Rcpp.h>

using std::cout;
using namespace Rcpp;

// [[Rcpp::export]]
int main() {
  for (int hashNum = 1; hashNum <= 5; hashNum++) {
cout << "#";
}
cout << "\n";
return 0;
}

/*** R
main()
*/
===========================================

Hit Ctrl + Enter, problem solved!

Tuesday, April 01, 2014

Data analysis on AWS cloud

Here is a good introduction on how to get started with data analysis on AWS cloud.

Counter