[R] Little question

Jason Turner jasont at indigoindustrial.co.nz
Tue Jun 8 11:56:09 CEST 2004


On Tue, 2004-06-08 at 21:44, zze-PELAY Nicolas FTRD/DMR/BEL wrote:
> Here I got a function :
> 
> f<-function(x){
> res<-list()
> res$bool=(x>=0)
> res$tot=x
> return(res)
> }
> 
> I want that a=res$bool and b=res$tot
> I know that a possible solution is :
> 
Like....

foo <- function(x,...){
	list(a=(x>=0),b=x)
}

Cheers

Jason




More information about the R-help mailing list