To: thth@hj.se Subject: Re: R-beta: slice.index in R From: Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> Date: 27 May 1998 17:48:01 +0200 In-Reply-To: thor.thoresen@hlk.hj.se's message of Wed, 27 May 1998 16:35:18 +0200 thor.thoresen@hlk.hj.se (Thor Thoresen) writes: > > I am currently trying to port a couple of S or S-plus add ons (Multiple > imputation) to R. > Since I do not have S or S-Plus it is a bit of a trial and error > process. Most things though, > run smooth. I encountered however a function "slice.index" for which I > cannot find > any R counterpart. I have searched the different available > documentations such as the > S-FAQ and S-Plus-notes with no luck. > Do anyone know what this S-Plus function is supposed to accomplish and > if there is > any method to accomplish the same in R? Here's the top of the help page: DESCRIPTION: Returns an array filled with integers, each of which identifies where in the current slice it is. This is a generalization of the row and col functions: row(x) can be expressed as slice.index(x,1) and col(x) can be expressed as slice.index(x,2). Doesn't sound too hard to duplicate. Do you want to try? I think a careful look at the sweep function might help.... -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help 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-help-request@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._