Displaying 2 results from an estimated 2 matches for "1while".
Did you mean:
while
2010 Dec 01
0
thank you so much
...00-1-21 -0.002912346Let's focus on the dates, by using weekdays(as.Date('2010-11-30')) == "Monday", im supposed to find the monday return (2nd column)i create an array which includes the dates, let's call it dates. then when i plug in the dates into the following codesi=1while(i<14){if(weekdays(as.Date(dates[i])) == "Monday"){pirnt ("yes")}else {print("no")}i=1+i}the programe does not run properly.......cuz im expecting to see "yes" been returned (there is not any "no" returned, all of them are "yes"......)....
2015 Sep 15
4
Fwd: problema en while y en extraer valores de un vector
Hola chicos,
muchas gracias, funcionan vuestros códigos, pero no entiendo porqué el mío
no funciona, y me gustaría aprender R bien.
Quiero sacar números de 5 en 5, desplazándome una posición cada vez para la
derecha:
a <- c(8,10,4,1,7,2,4,6,3,8)
b <- rep(0,5)
i=1
while (i<=6) {
b <- a[i:i+4]
print(b)
i=i+1
}
quiero que en la primera iteración me saque en