Question: Assignment 1: R Programming R programming requires very minimum of coding once you are familiar with the syntax. Try to avoid writing lengthy and unnecessary

Assignment 1: R Programming

R programming requires very minimum of coding once you are familiar with the syntax. Try to avoid writing lengthy and unnecessary code. Please check online resources. 

Create a data frame with the following content:

age

gender

salary

20

M

24000

35

F

89000

40

M

80000

55

M

56000

63

F

30000

21

F

56700

32

M

87000

44

M

105000

Hint: Create vectors for each column and then create a data frame using vectors. A sample is given in the lecture notes. age E) Find the maximum and minimum of salaries by gender. For example, the output for the max salary of males will be Note that 8 in the output is the row number in the data frame which is printed by default in R. Hint: Use subset() function. Make use of max() and min() functions in your selection criteria in the subset() function.

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 Databases Questions!