Re: [R] R loop problem

2011-08-04 Thread testrider
Worked like a charm! Thanks a lot Jean V Adams -- View this message in context: http://r.789695.n4.nabble.com/R-loop-problem-tp3718449p3718670.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://s

Re: [R] R loop problem

2011-08-04 Thread Jean V Adams
Cell) 715-623-6773 (FAX) http://www.glsc.usgs.gov (GLSC web site) http://profile.usgs.gov/jvadams (My homepage) jvad...@usgs.gov (E-mail) From: testrider To: r-help@r-project.org Date: 08/04/2011 07:21 AM Subject: [R] R loop problem Sent by: r-help-boun...@r-project.org I have run into a spee

Re: [R] R loop problem

2011-08-04 Thread jim holtman
A subset of actual data and what you would expect as a result would be very helpful. All you say is that p.q are vectors, but it would appear that they are character vectors, but the content is unknown. Also will the expression "q[i==p]<-z[i==y]" have the same length on each side; the vectors app

[R] R loop problem

2011-08-04 Thread testrider
I have run into a speed issue, and given the size of the problem it feels like there should be an easy solution. Here is the problem statement with some arbitrary numbers added. #p,q: vector with length(q)==length(p)==1 and length(levels(p))==3000 #y,z: vectors with length(levels(y))=length(y)