AW: [R] using matrix data for function

"Unternährer Thomas, uth" uth at
Wed Sep 17 20:16:24 CEST 2003

I'm not sure if that's the best way
apply(MAT, 1, FUN)

	-----Ursprüngliche Nachricht----- 
	Von: Bing Zhang [mailto:bih at] 
	Gesendet: Mi 17.09.2003 20:02 
	An: r-help 
	Betreff: [R] using matrix data for function

	Hi All,
	I have a function, f(x,y)
	I have a matrix of data, m,  with the 1st column is x and the 2nd column is y
	What's the best way to get f(x,y) for each row of the matrix?
	I tried
	result<-f(m[,1],m[,2]) but it doesn't work.
	1060 Commerce Park
	Oak Ridge National Laboratory
	P.O. Box 2008, MS 6480
	Oak Ridge, TN 37831-6480
	Phone: 865-241-0761
	Email: zhangb at
	R-help at mailing list

More information about the R-help mailing list