Cykly for

Intermediate R for Finance

Lore Dirick

Manager of Data Science Curriculum at Flatiron School

Cyklus for

one_to_five <- 1:5
one_to_five
1 2 3 4 5
for(number in one_to_five) {
  print(number)
}
1
2
3
4
5
Intermediate R for Finance

Iterace přes seznam

stock_list <- list(stock_name = "Apple", ticker = "AAPL", 
                     price = 126.5, good_deal = TRUE)

for(i in stock_list) { print(class(i)) }
"character"
"character"
"numeric"
"logical"
Intermediate R for Finance

Pojďme si procvičit!

Intermediate R for Finance

Preparing Video For Download...