[R] Re:How to create a R -application
Kevin Wang
Kevin.Wang at maths.anu.edu.au
Thu Oct 7 23:58:54 CEST 2004
Hi,
On Thu, 7 Oct 2004, Kunal Shetty wrote:
> Example for calculating the mean of a data set
>
> x <- c(8,11,16,18,6,4,20,25,9,13)
> u <- mean(x)
> u
R is an interpreted language, not a compiled one like C++ or Java.
Therefore you don't compile it. And for such a simple example, there
isn't much need in doing so.
However, compilation may come in handy when you are running simulations
and/or with some long loops, as interpreted languages aren't really good
at handling loops -- although you can get around with many loops by
vectorisation. I think Luke Tierney is working on an R Compiler, which
will allow you to compile such simulation and will decrease the running
time a lot...but I'm not sure when it will be released.
Cheers,
Kevin
--------------------------------
Ko-Kang Kevin Wang
PhD Student
Centre for Mathematics and its Applications
Building 27, Room 1004
Mathematical Sciences Institute (MSI)
Australian National University
Canberra, ACT 0200
Australia
Homepage: http://wwwmaths.anu.edu.au/~wangk/
Ph (W): +61-2-6125-2431
Ph (H): +61-2-6125-7407
Ph (M): +61-40-451-8301
More information about the R-help
mailing list