# Vector Names

# Create a vector containing the Home Nations' populations in millions

popmillions<-c(55.3,5.4,3.1,1.9)

# Check current values of names()

names(popmillions)

# Define names for each element

names(popmillions)<-c("England","Scotland","Wales","Northern Ireland")

# Display names

names(popmillions)

# Display popmillions vector with its names

popmillions

# Create a bar plot of the data

barplot(popmillions)

# Drop names by setting to NULL

names(popmillions)<-NULL

# Display popmillions again. Note the lack of names

popmillions