Second date with R

Oke, as my promise yesterday, I would try to write my second date with R, especially in the List features.

Btw, I just tried that “<-” an assignment marker can be change by “=”, I did it coincidentally because I forgot the assignment. But it works! :p

Before trying List in R console, we must know the differences between Vector and List. As far as I know, this is maybe not the best academic explanation but I hope it can be understood. When we combine two different data types in Vector, it would affect the other data (see previous posting), but with List we can protect the impact to another data, so we still can have different data types in one List. It seems there is unseen separator between one and another data in List.

For Example in Vector we could combine v = [5 6] with x = [“b” “a”] the result is a new vector with character type, because x already impact v in one Vector. But with List, we can regain the form of each types.
> comb <- list(a = 1, b = 0.5, c=”she”)
*the code above combine three data types into one List, but each cell were named as the initialization.

Anyway, this is just base package of R, we still do not use it for the ‘real’ performance as statistical package 😀 I wish R could be the best package that can mix MATLAB and SPSS 😉

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s