Top "For-loop" questions

A for loop is a control structure used by many programming languages to iterate over a range.

Why do R objects not print in a function or a "for" loop?

I have an R matrix named ddd. When I enter this, everything works fine: i <- 1 shapiro.test(ddd[,…

r for-loop printing r-faq
PHP sleep delay

In PHP, I want to put a number of second delay on each iteration of the loop. for ($i=0; $i &…

php for-loop delayed-execution timedelay
Very simple prime number test - I think I'm not understanding the for loop

I am practicing past exam papers for a basic java exam, and I am finding it difficult to make a …

java loops for-loop iterator primes
Java for loop vs. while loop. Performance difference?

Assume i have the following code, there are three for loop to do something. Would it run fast if i …

java for-loop while-loop
Looping through alphabets in Bash

I want to mv all the files starting with 'x' to directory 'x'; something like: mv path1/x*.ext path2/…

bash loops for-loop
ggplot does not work if it is inside a for loop although it works outside of it

I'm using a simple ggplot function which works fine outside a loop but not inside even if the iterative value …

r for-loop ggplot2
Last iteration of enhanced for loop in java

Is there a way to determine if the loop is iterating for the last time. My code looks something like …

java for-loop foreach conditional-execution
Non character argument in R string split function (strsplit)

This works x <- "0.466:1.187:2.216:1.196" y <- as.numeric(unlist(strsplit(x, ":"))) Values of blat$LRwAvg all look like …

string r for-loop strsplit
Python 3.5 iterate through a list of dictionaries

My code is index = 0 for key in dataList[index]: print(dataList[index][key]) Seems to work fine for printing the …

python list for-loop dictionary python-3.5
Removing item from vector, while in C++11 range 'for' loop?

I have a vector of IInventory*, and I am looping through the list using C++11 range for, to do stuff …

c++ vector for-loop c++11