[R] Function "assign"

From: Marco Venanzi <marvena_at_tin.it>
Date: Sat 04 Feb 2006 - 06:46:22 EST


I'm trying to apply the function "assign( )" to a subset of a matrix, but it doesn't work...

i.e.

example<-matrix(nrow=5,ncol=5)
assign("example[c(1,3),]",matrix(1:10,nrow=2,ncol=5))

but matrix "example" doesn't change ( get("example[c(1,3),]") is not useful to me)...how can I do this assignment? Thanks in advance,

                                          Marco
	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Feb 04 06:53:20 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:22 EST