You can refer to parts of vectors, matrices, data frames and list using either a direct reference or a list of indices. Examples:
Note to make life easier you could prepare a series of definitions and use them later to access the data you are interested in:
sect <- c("gnpagr","gnpind,"gnpserv")
and then use
world[,sect]
and defining rich countries, defined as countries having a GNP per captia above the median
rich <- world$gnpcap > median(gnpcap)
and then simply write
world[rich,sect]
to list the GNP produced by the three economic sectors for rich counties
Other useful definitions could be
europe <- world$continent == 'Europe ' asia <- world$continent == 'Asia '