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

  Explain the impact of web service technology

What is the impact of Web service technology on supply chain management? Specifically, how can a third-party logistics provider use this technology to either improve services or provide new services?

  Provide an overview of the topic including key terms

Provide historical background of the topic (e.g. famous psychologist).Provide an overview of the topic including key terms and concepts.Provide an example which will illustrate the topic (e.g. video, interactive exercise, skit, roleplay).Describe how..

  Cognitive capabilities of a newborn child

Society often views the newborn as a blank slate that needs to more fully develop before being able to start real learning. Is that the case? What have you observed about the cognitive capabilities of a newborn child?

  How and why was the event sociologically interesting

How and why was the event sociologically interesting? In what social context did the event occur? How many people were affected by the event? Are there trends in shared characteristics of the people affected by this event or similar events

  Post-cold war rise of ethno nationalism and irredentism

What effect has the post-Cold War rise of ethno nationalism and irredentism had on the U.S. military and U.S. foreign policy?

  Contribution of social cognitive theory

A person's sensory capacities are included among. Which of the following is thought to be a contribution of social cognitive theory? Mischel and his colleagues found that the ability to delay gratification increased with:

  Distinguish the role as clinical or non-clinical

Focusing on the specialty for which you were admitted to South University, select an advanced nursing role to research. (It must be one offered by South University.) According to the NPSGs, distinguish the role as clinical or non-clinical and how i..

  Special interest lobbyists issues

What regulations do you believe should be implemented that do not currently exist in terms of controlling activities by these individuals?

  Standard and poors investor services ratings

According to the Standard & Poor's Investor Services ratings, which of these ratings indicate a highly speculative bond

  How do you think about freedom in your life

How do you think about freedom in your life? What art forms (music, visual art, the arts broadly) do you think convey freedom in your personal sense?

  House of representatives chooses a president

When no candidate wins a majority in the electoral college, the House of Representatives chooses a president from

  Describe the power structure-the hierarchy

Describe how conflict happened. Describe patterns you have observed. What was the attitude about conflict? What skills were used to deal with conflict? If conflict was addressed-by whom, how was it resolved? What were the sources of conflict?

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