Hi All,

I'm an R programmer that has recently started learning Racket. I decided to 
start by trying to create a simple age-structured population model. In R, I 
would initialize a matrix and use nested for loops to move through the 
elements of the matrix and propagate the population forward through time. 
For my first attempt in Racket 
(https://gist.github.com/hinkelman/3ee6115cdd7f0a4c8f1672b7d8df5c27), I 
used for* to loop through a vector of vectors. The code in that gist 
doesn't quite work. There is apparently something wrong with how I'm using 
vector-set! such that "rows" in my vector of vectors are being updated 
prematurely. I would greatly appreciate it if someone could point out what 
I'm doing wrong there. I'm also interested in suggestions for alternative 
approaches because it seems unlikely that I have written this code in 
idiomatic Racket.

Thanks,

Travis

P.S. If it is helpful, here is a gist 
(https://gist.github.com/hinkelman/d5b8414b0c6383057d7846509a724bbf) with 
the R code that I was trying to write in Racket.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to