Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write Code in R Create a data frame ( named friend ) that includes following variables. # name consists of four friends' names # age

Write Code in R
Create a data frame (named friend) that includes following variables.
# name consists of four friends' names
# age consists of their ages
# momAge consists of their mothers' ages (You can make up the age)
# dadAge consists of their fathers' ages (You can make up the age) Example code:
# Create vectors
name <- c("Lucy", "Junga", "Mike", "Jason")
age <- c(35,24,55,43)
momAge <- c(64,55,76,68)
dadAge <- c(62,57,77,76)
# Cbind the vectors
friend <- cbind(name, age, momAge, dadAge)
# Convert to a data frame
frienddf <- as.data.frame(friend)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Linked Data A Geographic Perspective

Authors: Glen Hart, Catherine Dolbear

1st Edition

1000218910, 9781000218916

More Books

Students also viewed these Databases questions

Question

How can training contribute to a sustainability initiative?

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago