[R] replacement in a dataframe

From: Marco Venanzi <marvena_at_tin.it>
Date: Wed 26 Oct 2005 - 17:16:43 EST


Hi,I want to replace some elements of a dataframe "a", using 2 index vectors ("x" and "y") and a vector of replacement ("z") of the same length of "x" and "y". I've tried a[cbind(x,y)]<-z, but it doesn't work.How can I do it in a simply way?Thanks,

                                                                                                 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 Wed Oct 26 17:21:22 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:47 EST