Re: [R] Help in using unique count by match function

2012-04-19 Thread Rui Barradas
Hello, arunkumar wrote > > Hi > > My code looks like this > > I have two parameters x and par1. X contains values and par1 contains the > function which i required to use > > if par1 is max then output should be max(x). > > FUN <- match.fun(par1) > result=FUN

Re: [R] Help in using unique count by match function

2012-04-19 Thread R. Michael Weylandt
I think the OP is looking for the construct length(unique(x)) but not really sure what the rest of the question is. Michael On Apr 19, 2012, at 2:12 AM, Petr PIKAL wrote: > Hi > > Your question is rather cryptic. Why the output shall be 3? What has > unique count to do with match function?

Re: [R] Help in using unique count by match function

2012-04-18 Thread Petr PIKAL
Hi Your question is rather cryptic. Why the output shall be 3? What has unique count to do with match function? Maybe you want something what is described in switch help. See ?switch Regards Petr > > Hi > > My code looks like this > > I have two parameters x and par1. X contains values an