Skip to content
Prev 208032 / 398503 Next

Applying a function on each columns of a matrix

Hello,

You could do something along the following lines:


sapply( 1:ncol( my.matrix ),
	function( i )
		my.foo( my.matrix[,i], my.parm[i]
)

Best regards,

Carlos J. Gil Bellosta
http://www.datanalytics.com
anna wrote: