Skip to content
Back to formatted view

Raw Message

Message-ID: <20091117181742.ofiev4kxi8o440cw@cubmail.cc.columbia.edu>
Date: 2009-11-17T23:17:42Z
From: Bruno Giovannetti
Subject: :Problem with Looping

Hello,

Sometimes the looping (using "for") seems to skip some iterations.

An example:

arg <- matrix(NA,length(seq(.30,.5,.01)),1)
for (i in seq(.30,.5,.01)) {
arg[i*100-29] <- i
}
arg

What is the problem with this coding, please?

Thank you so much,
-- 
Bruno Cara Giovannetti, PhD Candidate
Economics Department
Columbia University
Personal Webpage: www.columbia.edu/~bcg2108