hit counter

Timeline

My development logbook

Scala IDE

Downloaded Scala IDE from TypeSafe. The simplest thing to test is to write a ‘Hello Word’ program. I did that by creating a Scala Object. Here is the code

1
2
3
4
5
package greeter

object helloworld {
    println("hello, world")
}

I proceeded to run it by using the ‘Run it…’. I expected to see ‘Run as Scala Application’ but the option was not there.

Turns out it is my mistake. I need to extends the object from App:

1
2
3
4
5
package greeter

object helloworld extends App{
    println("hello, world")
}

Then the option will appear (as shown here):

Simple R Vector

Simple R vector

1
2
3
> x  x
 [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 
 [16] 16 17 18 19 20

[1] means the index of the element in the resultant vector