Skip to content
Prev 123964 / 398498 Next

Lisp-like primitives in R

Not all of us are familiar with lisp (I have done a little, but not
enough to really understand what you are asking).  If you tell us what
find, member, cond, and loop do, or what functionality you are looking
for, then we will have a better chance of telling you how to do the same
in R.

Just guessing by the names:

The 'which' function may do something similar to 'find'.

'is.element' or '%in%' may do the same as 'member'.

'ifelse' and/or 'switch' may do what 'cond' does.

'replicate', 'lapply', 'sapply', 'while', and 'for' may give the
functionality of 'loop'.

Those are just guesses based on the names, I don't know what exactly
they do, so if I am way off, then tell us what you want them to do.