64.6k views
5 votes
Create a numeric vector called age whose elements contain the ages of three people you know, where the names of each element correspond to the names of those people.age<-c(26,29,30)names(age)<-c("Al","Ani","Nav")age

## Al Ani Nav

## 26 29 30

User Drdot
by
5.2k points

1 Answer

6 votes

Answer:

age<-c(20,30,40)

names(age)<-c ("ELI", "ALI", "JON")age

## ELI ALI JON

## 20 30 40

Explanation:

The above given vector named age consists of three elements. Each element consists of ages of three people, ELI, ALI and JON, such that 20 corresponds to ELI, 30 to ALI and 40 to JON.

User Roni Castro
by
4.3k points