[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-devel
Subject:    More XLisp in R
From:       Jan de Leeuw <deleeuw () stat ! ucla ! edu>
Date:       2002-08-22 6:59:03
[Download RAW message or body]

Clearly the beauty of Lisp sort of gets lost. Also RXLisp
cannot return logicals, strings, lists, characters (no convertors
yet). Still, none of that is essential, and all of this is exciting.

 > .XLisp("mean",.XLisp("list",1,2))
[1] 1.5
 > .XLisp("iseq",as.integer(10))
  [1] 0 1 2 3 4 5 6 7 8 9
 > x<-1:10
 > .XLisp("elt",x,as.integer(1))
[1] 2
 > .XLisp("sample",1:20,as.integer(10),T)
  [1]  9 18  7  4 13 19  9  7  9  3
 > .XLisp("repeat",1:10,as.integer(2))
  [1]  1  2  3  4  5  6  7  8  9 10  1  2  3  4  5  6  7  8  9 10
 > .XLisp("uniform-rand",as.integer(10))
  [1] 0.33747593 0.69355427 0.97968865 0.39687786 0.81754441 0.59710673
  [7] 0.02034651 0.48217749 0.29217949 0.05538188
 > .XLisp("princ",3)
3.0[1] 3
 > .XLisp("order",c(1,3,2,5,4))
[1] 0 2 1 4 3
 > .XLisp("sort-data",c(1,3,2,5,4))
[1] 1 2 3 4 5
 > .XLisp("bivnorm-cdf",.3,.2,.6)
[1] 0.4551159
 > y<-"abcd"
 > .XLisp("length",y)
[1] 4
 > sapply(-9:9/10,function(x) .XLisp("bivnorm-cdf",0,0,x))
  [1] 0.07178343 0.10241662 0.12659185 0.14758378 0.16666680 0.18450516
  [7] 0.20150674 0.21795294 0.23405789 0.25000000 0.26594211 0.28204706
[13] 0.29849326 0.31549484 0.33333320 0.35241622 0.37340815 0.39758338
[19] 0.42821657
===
Jan de Leeuw; Professor and Chair, UCLA Department of Statistics;
US mail: 9432 Boelter Hall, Box 951554, Los Angeles, CA 90095-1554
phone (310)-825-9550;  fax (310)-206-5658;  email: deleeuw@stat.ucla.edu
homepage: http://gifi.stat.ucla.edu
   
------------------------------------------------------------------------ 
-------------------------
           No matter where you go, there you are. --- Buckaroo Banzai
                    http://gifi.stat.ucla.edu/sounds/nomatter.au
   
------------------------------------------------------------------------ 
-------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic