Question: x and y are given as below, x = { 2 , 5 , 8 , 2 , 3 , 6 , 4 , 9

x and y are given as below,
x ={2,5,8,2,3,6,4,9,3,5} y ={1,3,5,1,2,4,2,6,1,2}
Provide the R coding to compute the following functions. Note, we will use X and Y to denote the i' element of x and y, respectively etc.
a) Create a data frame that contains the information of x and y. Name it as data1.
[2 Marks]
b) Find log10(X) for each i.[2 Marks]
c) Find 2(Y-0.5) for each i.[2 Marks]
d) Find the standard deviation and range of x and y, respectively. [8 Marks]
e) Add the information of gender to the data set, data1, and name the new data frame as data2.
gender ={ F,F,M, M, F, M, F,F,M, M}
[3 Marks]
f) Extract the information of x from the data set, data2, for those are females.
[3 Marks]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!