Write a function to generate a histogram

Assignment Help Other Subject
Reference no: EM131439663

Assignment: Building your package

For this assignment, you will have to build a package. You will be grouped into teams of 4. Each student needs to upload on FASER:
- the archive with the source of the package (the tar.gz file)
- a 1 page document where they explain what their contribution was and how they worked in the team
- the presentation.

Everyone in the group should work on both the code and the presentation. The presentation will be given together as a group with exemplification on how the package works.

If two people worked on a function or the same block of code, please clarify who did what.

Do not forget to add relevant comments for each block of code or function that you write. 30 of the points for each part will be provided for supplying an optimal implementation (it includes comments, formatting, generality, sensible data structures, vectorisation vs for-loops etc.). In other words, if you provide a solution that works, but is not optimal you will not get more than 70 of the points associated with that task.

Description

There are several multiple-choice exams for students in Biological Sciences Department (in the test data we uploaded, we included 5 exams). Each exam has different number of questions, but students will only answer a subset of questions (randomly chosen from that exam). We uploaded eigth files:

- correct_answers_MODULE.dat contains the correct answers for each of the 5 exams.
- number_of_questions.tsv contains the number of questions each student needs to answer for each exam.

- students.tsv the ID of each student and their program ("Biological Sciences" or "Genetics").
- examsPerSubject.tsv a table with whether an exam will be taken by students of the "Biological Sciences" or "Genetics" programs or not.
Your package, should have the following functionality.

a) Generate exam sheets

- write a function generateStudentAnswersForExam which randomly generate answers for questions for a student. The function gets as input moduleID, studentID, totalNumberOfQuestions, numberOfQues- tionsToAnswer, writeToFile. If the last argument is a filename, write the data into that file, otherwise return the data.frame with the answers. The question numbers should be random and students can pottentially answer only to some of their questions. The file/data.frame should have 2 columns (question and answer) and these should be printed in the file. The answers to the questions can be a, b, c, d, e.
- write a function generateAllStudentsAnswersForExam which randomly generate answers for questions for all students taking the exam. The function gets as input the moduleID, num- ber_of_questions (number_of_questions.tsv), allStudentIDs (students.tsv), examsPerSubject (examsPerSubject.tsv) and writeToFile. The function should read this from files. Alternatively, you could write an additional function that receives these as data.frames. If the last argument is TRUE, then write the data into a file for each student, otherwise return a list with data.frames with the answers for each student.

b) Mark exams

- write a function markStudentsForExam(), which takes as input the directory with the correct answers for each exam, the exam files for each student and the name of the exam
- write a function markStudents(), which takes as input the directory with the correct answers for each exam and the exam files for each student.
Hint: You need to convert the number of correct answers to the mark taking into account the number of questions the students had to answer. The mark is an integer between 0 and 100.
- write a function to add a degree to each exam.
- "1st" for marks higher or equal to 70
- "2:1" for marks higher or equal to 60 and lower than 70
- "2:2" for marks higher or equal to 50 and lower than 60
- "3rd" for marks higher or equal to 40 and lower than 50
- "failed" for marks lower than 40

c) Plot results

- write a function to compute the degree to each student based on all their marks (the average over all exams they had to take). If a student failed one exam, they would have failed the year.
- write a function to generate a barplot and/or pie chart with the number/percentage of students that got a certain degree per exam.
- write a function to generate a barplot and/or pie chart with the number/percentage of students that got a certain degree overall.
- write a function to generate a scatterplot between the marks at two exams using only the students that took both exams. On the x-axis you should have marks for exam 1 and on the y-axis marks for exam 2.
- write a function to generate a line plot (with vertical lines) to display the marks ordered decreasingly for each student that took that exam. Use different colours for students studying Biological Sciences and Genetics, but do not use different colours for different marks.

d) Statistical analysis

- write a function to generate a histogram with the marks per exam.
- write a function to generate a histogram with the marks per subject (Biological Sciences or Genetics).
- write a function to perform a statistical analysis to test whether there is difference between the marks of Biological Sciences students and Genetics students for an exam
- write a function to perform a statistical analysis to test whether there is difference between the marks of Biological Sciences students and Genetics students overall

Additional points:

a) Writing manuals

b) Writing the vignette

c) Writing test units

d) Writing additional functions

The last 20 points of this assignment will be given for additional functionality of your package. In particular, we want to see you write new functions, beyond what we asked you to do but related to marking students exams.

Team 1:

- POP, ROMANA TABITA
- GEORGIOU, MERILIN
- LUDLAM, JAMES CHARLES
- ABU, LATIF TOMMIE


Team 2:

- BREZOIU, DAIANA-OANA
- THEOCHAROUS, GEORGIOS
- AKHURST, JENNIFER ELLEN
- CHAN, KHUNG HUAN


Team 3:

- DAVIS, ANDREW MICHAEL
- HADJICONSTANTI, ANDRIANI
- ZAMFIRESCU, ANA-MARIA
- MEHRETEAB, HANNAH TESFAY


Team 4:

- GRECO, ALESSANDRO PIO
- FARIAS GARCIA, PAULA
- MERRITT, RYAN JAMES
- ARALIYA KANKANAMLAGE, HASITHA LAKSHMAN


Team 5:

- BARRETO FRANCISCO, SARA
- GAVRIEL, CHRISTIANA
- PLUMMER, EDEN LAURICE
- HOLLOWAY, CATHAL JOHN


Team 6:

- BASTON, JANE LOUISA
- POVALL, CHELSEA
- ATHANASIOU, PANTELITSA
- RANDALL, TYLER JOHN MICHAEL


Team 7

- IRELEWUYI, OYETADE OLUWAMAYOKUN
- JORDAN, ALEXANDER MORRIS
- LEITHEAD, EMMA MELISSA JOY
- YIANNAKKOS, KONSTANTINOS

Reference no: EM131439663

Questions Cloud

What are some of the ethical issues that can arise : What are some of the ethical issues that can arise during a research study? What tools are available to research institutions to assure ethical compliance of the researchers?
Describe interpersonal conflict that not handled effectively : Watch one episode of one of the above television programs and identify and describe one interpersonal conflict that was not handled effectively.
Why is it important to know the variables within research : At this point you should be narrowing in on potential topics for your dissertation. The specifics may not be targeted but you should know the general area you wish to research. Using the topic area you are considering, explain how the measurement ..
Discuss operationalization choices and offers research : Babbie discusses operationalization choices and offers four research questions and ways to address them. Choose two of the questions and discuss how the applications mentioned are good choices or how they may not bring about the expected results.
Write a function to generate a histogram : write a function to compute the degree to each student based on all their marks (the average over all exams they had to take). If a student failed one exam, they would have failed the year.
Small groups of untrained volunteers : During the Revolutionary War, there was no organized medical or nursing corps; small groups of untrained volunteers cared for the wounded or sick in their homes, barns, or churches. Several nursing leaders were influential in making this change..
Analyze the data using the appropriate control chart : Analyze the data in Figure 11.22 and, using the appropriate control chart, determine whether the system is in control.
Personally observed an effective leader : Describe one situation in which you personally observed an effective leader, what made hi or her effective and why?
Provide overview of successful company that you have chosen : Provide a brief overview of successful company that you have chosen to benchmark for management best practice. Include specific examples relating to fundamental principles of management and the company's mission and vision statement.

Reviews

Write a Review

Other Subject Questions & Answers

  Cross-cultural opportunities and conflicts in canada

Short Paper on Cross-cultural Opportunities and Conflicts in Canada.

  Sociology theory questions

Sociology are very fundamental in nature. Role strain and role constraint speak about the duties and responsibilities of the roles of people in society or in a group. A short theory about Darwin and Moths is also answered.

  A book review on unfaithful angels

This review will help the reader understand the social work profession through different concepts giving the glimpse of why the social work profession might have drifted away from its original purpose of serving the poor.

  Disorder paper: schizophrenia

Schizophrenia does not really have just one single cause. It is a possibility that this disorder could be inherited but not all doctors are sure.

  Individual assignment: two models handout and rubric

Individual Assignment : Two Models Handout and Rubric,    This paper will allow you to understand and evaluate two vastly different organizational models and to effectively communicate their differences.

  Developing strategic intent for toyota

The following report includes the description about the organization, its strategies, industry analysis in which it operates and its position in the industry.

  Gasoline powered passenger vehicles

In this study, we examine how gasoline price volatility and income of the consumers impacts consumer's demand for gasoline.

  An aspect of poverty in canada

Economics thesis undergrad 4th year paper to write. it should be about 22 pages in length, literature review, economic analysis and then data or cost benefit analysis.

  Ngn customer satisfaction qos indicator for 3g services

The paper aims to highlight the global trends in countries and regions where 3G has already been introduced and propose an implementation plan to the telecom operators of developing countries.

  Prepare a power point presentation

Prepare the power point presentation for the case: Santa Fe Independent School District

  Information literacy is important in this environment

Information literacy is critically important in this contemporary environment

  Associative property of multiplication

Write a definition for associative property of multiplication.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd