Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 138

Note – No counter in the for loop

Оглавление

Unlike most computer languages, R does not need to use a “counter” to use a for-loop.

x <- c(0, 1, -1, 102, 102) for ( j in x) { print(j) } ## [1] 0 ## [1] 1 ## [1] -1 ## [1] 102 ## [1] 102

The Big R-Book

Подняться наверх