Archives

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 😉

First sight of R

Oke, this is began when Rob Hyndman the Forecasting Professor asked me to get acquaintance with R. Who is R? me? Obviously no.. it is a statistical package, free and of course legally installed. You can download it in http://www.r-project.org/ (thanks to Mr.Gum-Gum for giving me the site). If you are in Indonesia, please directly to go to this link http://cran.repo.bppt.go.id/ to download it.

Hmm.. in the homepage, there is a sophisticating graph, makes everyone want to download it. But I really not suggest this to non-GUI person, because you’ll hate it. It’s based on console, similar with MATLAB console without the fancy buttons or drop-down menus. Another similarity is both of them are good at working in vector or matrix, I mean that you should not know the differences between float, long or double in primitive data types as in Java Programming.
You only really need to know when to use the integer or float or the string one. Does it make you better? :))

First lesson from this early usage is function c. I just wondered why it must one character to name a function, rrrggh.. just type help(c) in your console, and surprisingly it will open a html view through your browser, wow MATLAB couldn’t do this! maybe it can but not implemented yet.

C is an abbreviation from Combine Values, into a Vector or List. As far as I concern, a vector is just one dimension whether it is column or row, but let us see.. How about List? physically List is same with array.

If I want to make vector (1 4 5), what should I type?
> c(1,4,5)
*it is doesn’t matter when you should put your ; at the last or not, doesn’t make any differences*

Wait what is the variable name of the vector I just made? it has no name. How to put it in a specific name? Type this..
> varname <- c(1,4,5)
*it named ‘varname’, of course you can rename it by yourself. Did you see ‘<-‘ it replaced the ‘=’ or assignment syntax. Little bit funny ya.. :p But, from this marker I got that the idea was same with Java or C or MATLAB which is the assignment should be done from right to the left.

How to combine integer with float in one vector? That’s easy, although it may violate the concept of data type integrity, but with R you freely do anything 😉
> c(2,6,7.8)
*look at the result, the integer one will adapt the pattern, you may try with two or more digits precision and observe what the result

I think that’s not difficult to combine with the character, let’s try
> c(2,6,”f”)
*do you see what happened? yap! all the values will turn into character

This next features is same with MATLAB, that fill in the vector with sequential number. As a example, I want to create new vector named ‘seq’=[1 2 3 4 5 6 7 8 9 10].
If you try this code below, so you may a diligent learner but not the smart one 😀
> seq <- c(1,2,3,4,5,6,7,8,9,10)
Please try this one, because it will optimize your performance a lot, especially typing performance 😀
> seq <- c(1:10)
If you see the ‘:’, it means ‘until’, similar with MATLAB’s

Surely, you can combine the sequential number with a character or float or other integer. Just try to make this vector (“1” “2” “3” “4” “5” “6” “3” “5.6” “t”)
> v <- c(1:6, 3, 5.6, “t”)

These explanations above only about vector, about list I am going to type it tomorrow 😉 Please do not quote anything from this blog because it is just my first sight.. See u!

Curriculum Vitae

I’m just looking for some materials for teaching Introduction to Algorithm and Java Programming level 1. I got many resources, and I read many great scientist’s CV. One of them is Ivan Stojmenovic, I do not know him before and vice versa (absolutely!), but I read his short CV (he provides full CV, medium CV and short CV). I found many researches, books, journals and many kind of publications about his interest area, it’s totally different with my CV or many CV I’ve read in my colleagues 😀

In my CV is written my education history, but he doesn’t need to explain where he got his undergraduate, graduate or postgraduate title, how long and how best (GPA). He just show his evidence of his ability and also his passion.

In my CV is written my place of birth, date and many kind of identity things, in his CV I can not found how old is he, and where he come from, what his religion, what his hobby, I do not know all about these all, or maybe I shouldn’t know all those things.. because it doesn’t affect his publication or his passion of wireless sensor.

From this moment, I got some lesson:
1. Your achievement will speak more than your educational background..
2. You may have a bad background of family, race, or religion may be? but you can be the person you want to be in the future..
3. And vice versa, you may have a good background of everything, but you will speak as your own name and personality..

People are getting smarter in these days 🙂 they could understand you more than you understand yourself..

Editing document ain’t easy..

Many of IT people judging that a typist or editor is simpler job rather than a programmer.. *CMIIW
But, if you ever had document editing with specific template and you don’t have much patience, I bet you will give up! really..
Document editing has same difficulty to code some program for me, here they are the similarity I just have found

  • In programming you have specific structure to write, in document editing you have specific tight rule to make your document looks eligible..
  • In programming you have to recognize your IDE (Integrated Development Environment) well in order to make less bug in your code, likewise in document editing you have to make a good relationship with your word processor in order to manipulate your document precisely..
  • In programming, one single flaw will failed your program maybe this effect can not comparable with document editing, because it still look like a document even there more than one flaw, but in specific term like journal editing, one flaw is not tolerable, and journal jury will definitely reduce your journal’s degree. You can call them as a God or Goddess of document editing, who can see one small flaw at a glance, they have and always have a same duty as your program compiler 😀

Both of them need much your patience and control ability..
So, respect your typist, secretary or document editor, their job isn’t that easy as you think 😉

Rihanna feat. Drake ~ What’s your name?

Nilai Kelas D Statistika

Bacalah pesan moral berikut ini dan basmalah, sebelum melihat nilai masing-masing..

.: Do the best, let God do the rest..
.: Do the best, pray to God to give the best..
.: Nothing is impossible..

Bacalah pesan fisik sebelum melihat nilai masing-masing..

.: Hasil prediksi nilai akhir dapat dilihat pada kolom paling kanan, dengan asumsi nilai Pendalaman Lisan dan Poster memiliki nilai rata2 95 (nearly perfect)
.: Nilai tersebut belum termasuk nilai kuantitatif (sikap di kelas, afektif dll)
.: Nilai Checkpoint adalah nilai saat ini (belum menginjak Pendalaman dan Poster) namun hasil nya dibagi 70 (70%), bukan 100 (100%)..

Prediksi diatas tidak menggunakan metode peramalan yang diukur dengan akurasi, melainkan dengan menggunakan Sistem Persamaan Linear, dengan fungsi tujuan memaksimalkan nilai prediksi yang akan didapat (perkiraan nilai akhir) dengan batasan nilai rata-rata Pendalaman Lisan dan Poster tidak lebih dari 95.

A: Kenapa 95?
Vhyn: Karena saya tidak ingin memberikan harapan palsu untuk mendapatkan nilai rata-rata Pendalaman Lisan dan Poster diatas 95, sekalipun itu mungkin terjadi, namun probabilitasnya 2.5%

A: Menggunakan rumus apa menghitung prediksi nilai tersebut?
Vhyn: Nilai saat ini sampai pada checkpoint 70%, itu artinya masih ada 30% kesempatan untuk meraih nilai setinggi-tingginya pada saat Pendalaman Lisan dan Poster, namun setinggi apapun nilai rata-rata tersebut, tidak akan bisa melewati nilai prediksi yang sudah ditampilkan.. Tapi jangan cemas, let God do the rest :)

A: Apa arti dari icon hijau, kuning dan merah?
Vhyn: merah adalah 33% nilai terbawah, kuning adalah 66% nilai tengah (diantara terbawah dan teratas) dan hijau adalah 33% nilai teratas

Nilai Kelas C Statistika

Bacalah pesan moral berikut ini dan basmalah, sebelum melihat nilai masing-masing..

.: Do the best, let God do the rest..
.: Do the best, pray to God to give the best..
.: Nothing is impossible..

Bacalah pesan fisik sebelum melihat nilai masing-masing..

.: Hasil prediksi nilai akhir dapat dilihat pada kolom paling kanan, dengan asumsi nilai Pendalaman Lisan dan Poster memiliki nilai rata2 95 (nearly perfect)
.: Nilai tersebut belum termasuk nilai kuantitatif (sikap di kelas, afektif dll)
.: Nilai Checkpoint adalah nilai saat ini (belum menginjak Pendalaman dan Poster) namun hasil nya dibagi 70 (70%), bukan 100 (100%)..

Prediksi diatas tidak menggunakan metode peramalan yang diukur dengan akurasi, melainkan dengan menggunakan Sistem Persamaan Linear, dengan fungsi tujuan memaksimalkan nilai prediksi yang akan didapat (perkiraan nilai akhir) dengan batasan nilai rata-rata Pendalaman Lisan dan Poster tidak lebih dari 95.

A: Kenapa 95?
Vhyn: Karena saya tidak ingin memberikan harapan palsu untuk mendapatkan nilai rata-rata Pendalaman Lisan dan Poster diatas 95, sekalipun itu mungkin terjadi, namun probabilitasnya 2.5%

A: Menggunakan rumus apa menghitung prediksi nilai tersebut?
Vhyn: Nilai saat ini sampai pada checkpoint 70%, itu artinya masih ada 30% kesempatan untuk meraih nilai setinggi-tingginya pada saat Pendalaman Lisan dan Poster, namun setinggi apapun nilai rata-rata tersebut, tidak akan bisa melewati nilai prediksi yang sudah ditampilkan.. Tapi jangan cemas, let God do the rest 🙂

A: Apa arti dari icon hijau, kuning dan merah?
Vhyn: merah adalah 33% nilai terbawah, kuning adalah 66% nilai tengah (diantara terbawah dan teratas) dan hijau adalah 33% nilai teratas

Nilai Kelas B Statistika

Bacalah pesan moral berikut ini dan basmalah, sebelum melihat nilai masing-masing..

.: Do the best, let God do the rest..
.: Do the best, pray to God to give the best..
.: Nothing is impossible..

Bacalah pesan fisik sebelum melihat nilai masing-masing..

.: Hasil prediksi nilai akhir dapat dilihat pada kolom paling kanan, dengan asumsi nilai Pendalaman Lisan dan Poster memiliki nilai rata2 95 (nearly perfect)
.: Nilai tersebut belum termasuk nilai kuantitatif (sikap di kelas, afektif dll)
.: Nilai Checkpoint adalah nilai saat ini (belum menginjak Pendalaman dan Poster) namun hasil nya dibagi 70 (70%), bukan 100 (100%)..

Prediksi diatas tidak menggunakan metode peramalan yang diukur dengan akurasi, melainkan dengan menggunakan Sistem Persamaan Linear, dengan fungsi tujuan memaksimalkan nilai prediksi yang akan didapat (perkiraan nilai akhir) dengan batasan nilai rata-rata Pendalaman Lisan dan Poster tidak lebih dari 95.

A: Kenapa 95?
Vhyn: Karena saya tidak ingin memberikan harapan palsu untuk mendapatkan nilai rata-rata Pendalaman Lisan dan Poster diatas 95, sekalipun itu mungkin terjadi, namun probabilitasnya 2.5%

A: Menggunakan rumus apa menghitung prediksi nilai tersebut?
Vhyn: Nilai saat ini sampai pada checkpoint 70%, itu artinya masih ada 30% kesempatan untuk meraih nilai setinggi-tingginya pada saat Pendalaman Lisan dan Poster, namun setinggi apapun nilai rata-rata tersebut, tidak akan bisa melewati nilai prediksi yang sudah ditampilkan.. Tapi jangan cemas, let God do the rest 🙂

A: Apa arti dari icon hijau, kuning dan merah?
Vhyn: merah adalah 33% nilai terbawah, kuning adalah 66% nilai tengah (diantara terbawah dan teratas) dan hijau adalah 33% nilai teratas