Wat is een list?

Introductie tot R voor Financiën

Lore Dirick

Manager of Data Science Curriculum at Flatiron School

Lists

cash
  company cash_flow year
1       A      1000    1
2       A      4000    3
3       A       550    4
4       B      1500    1
5       B      1100    2
6       B       750    4
7       B      6000    5
company_name <- "DataCampers Inc"
Introductie tot R voor Financiën

Lists

my_company <- list(company_name, cash)

my_company
[[1]]
"DataCampers Inc."
[[2]]
  company cash_flow year
1       A      1000    1
2       A      4000    3
3       A       550    4
4       B      1500    1
5       B      1100    2
6       B       750    4
7       B      6000    5
Introductie tot R voor Financiën

Lijsten subsetten

my_company[1]
[[1]]
"DataCampers Inc."
my_company[[1]]
"DataCampers Inc."
my_company[[2]]
  company cash_flow year
1       A      1000    1
2       A      4000    3
3       A       550    4
4       B      1500    1
5       B      1100    2
6       B       750    4
7       B      6000    5
Introductie tot R voor Financiën

Laten we oefenen!

Introductie tot R voor Financiën

Preparing Video For Download...