Question: Write R codeCreate an additional column in the data frame ( friend ) that results in the total ages for the three persons in each
Write R codeCreate an additional column in the data frame friend that results in the total ages for the three persons in each family friend mother father
Example code:
# Convert character value to numeric to add
frienddf$age asnumericascharacterfrienddf$age
frienddf$momAge asnumericascharacterfrienddf$momAge
frienddf$dadAge asnumericascharacterfrienddf$dadAge
# Add a column for total age
frienddf$totalAge frienddf$age frienddf$momAge frienddf$dadAge
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
