Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Homework Help/Study Tips Expert

Assignment: Marking exams

For this assignment, create a file called YOURNAME_assignment_01.R, where you will put your solutions.

Description

Students have sat a multiple-choice exam. The exam had 100 questions, and each answer was one of a, b, c, d and e. We supplied a zip file data.zip which contains several files. You will need to first unzip this file. The file correct_answers.dat stores the correct answer for each question (in order), e.g. the fifth entry is the correct answer for question 5. The students had to answer 30 questions from the 100 available questions (each student had a different set of questions to answer) and their answers are stored in files student_ID.tsv. The first column of this file contains the question that is being answered and the second column, their answer.

Your task is to write a script that will mark each student's performance, and produce a data.frame which stores the results.

a) Read the correct answers and store it to a vector called correct_answers. What is the correct answer of question 54?

b) Create a vector with all filenames containing student's answers. The files containing student's answers are called student_ID.tsv.

c) Extract students IDs from the names of the files.

Hint: return a vector of integer numbers with the corresponding ID for each filename.

d) Write a function called markStudent to read a student's answers from the file and return the number of correct answers. How many answers did student 4 get?

Hint: The function should take as arguments the filename with the answers and a vector with the correct answers for all questions.

e) Compute the number of correct answers for each student. How many students got at least 20 correct answers.

f) Compute a mark for each student and store the marks into a vector called marks. Note that a mark is an integer between 0 and 100.

Hint: Each correct answer will weight 3.33 points. Round the mark to the closest integer.

g) Create a data.frame containing the following columns: studentID, filename, correct and mark. Order the data.frame based on student's id.

Export this data.frame to a file called students_marks_YOURNAME.tsv. Do not use quotation marks when writing the text and include in this file the colnames, but not the rownames.

Attachment:- Assignment Files.rar

Homework Help/Study Tips, Others

  • Category:- Homework Help/Study Tips
  • Reference No.:- M92213161
  • Price:- $90

Guranteed 48 Hours Delivery, In Price:- $90

Have any Question?


Related Questions in Homework Help/Study Tips

The purpose of this assignment is to construct and design a

The purpose of this assignment is to construct and design a research proposal. I am in need of help with constructing my research proposal paper. I have decided to whether social media has a significant effect on suicide ...

Question part two paperpresent information in a 3-4-page

Question: Part Two: Paper Present information in a 3-4-page paper. (APA format), title page, no abstract, reference page (minimum one nursing journal reference on topic). 1. Name of AA/NA meeting: 2. Goals/purposes of th ...

What are the three ways in which heredity and environment

What are the three ways in which heredity and environment may be correlated, using examples from development?

Question 1 - kilocalories and eer from the actual intakes

Question 1 - Kilocalories and EER (from the Actual intakes vs. Recommended intakes report) Review and compare the EER and your caloric intake. List your actual intake and the recommended intake. Was your caloric intake a ...

Question a concept analysis is an exercise designed to help

Question: A concept analysis is an exercise designed to help a researcher become as familiar as possible with a concept. For the purposes of nursing, a concept might be related to health, managed care, or a variety of ot ...

Question although many new nationally known programs are

Question: Although many new nationally known programs are available aimed at preventing substance abuse and addictions, many people develop addictions every year. The tendency to develop addiction varies with different a ...

Question for your essay follow these instructions from pgs

Question: For your essay follow these instructions from pgs. 153-4 of Thinking for Yourself by Marlys Mayfield. "Think of a major problem from your own life (or someone else's) that involved the discovery of one or more ...

Question - after reading the related text chapter and the

Question - After reading the related text chapter and the excerpt from Karl Marx and Friedrich Engels'' "The Communist Manifesto," do you think that employee-owned companies address some of Marx's concerns about the dysf ...

Discuss the following with an essay of at least 350

Discuss the following with an essay of at least 350 words. Read Habakkuk. Summarize his dialogue with God. Trace the progression in the prophet's attitude through these three chapters, noting particularly 1:1-4, 1:12-2:1 ...

Question assignment instructionscreate a mind map a chart

Question: Assignment Instructions Create a mind map, a chart, or another visual that compares social influences on communication development and on gender in both males and females. The link below will show you what a mi ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As