Biostatistics & Computational Analysis RSTUDIO 1. Write a program to take a positive whole number from user and do the following task: (You are expected to write a simple, easy-to-follow function that...

1 answer below »
Rstudio assignment


Biostatistics & Computational Analysis RSTUDIO 1. Write a program to take a positive whole number from user and do the following task: (You are expected to write a simple, easy-to-follow function that does all the questions' assigned tasks) a. Separate all digits in the number and save them in a vector array named “Info”. b. Check every digit you saved in “Info” is even or odd. For odd digit use “O” and for Even digit use “E” to create another vector (named Odd_Even) of the same size of “Info”. c. Check every digit you saved in “Info” is a prime or not a prime number. For the prime digit, use “P” and for the Not Prime digit use “NP” to create another vector (named Prime_info) of the same size of “Info”. d. For number with more than 4 digits, find the minimum, maximum, mean, median, and standard deviation of all digits saved in Info array. Create a vector with the same size of “Info” vector. Store the value of the calculated minimum, maximum, mean, median, and standard deviation in the first five indices and fill the rest of the vector by zeros. e. Combine vectors in Part A, B, C, and D (if it exists!) to define a data frame (Name: Number_Information). Export the data frame as an excel file (You may install some Packages!). 2. We have 365 days per year. Make a program to take the day number as an input and in return give the following information: 1. To which month that day belongs to? 2. Day number in the month 3. Weekday Example 3. Create a function to print squares of numbers in sequence and also calculate their summation: 1^2+2^2+3^2+4^2…….n^2 4. Create a tibble containing only family and personal names, in that order. You do not need to assign this tibble or any others to variables unless explicitly asked to do so. However, as noted in the introduction, you must use the pipe operator %>% and code that follows the tidyverse style guide. 5. Write a function called summarize_table that takes a title string and a tibble as input and returns a string that says something like, “title has # rows and # columns”. Example, summarize_table('our table', person) should return the string "our table has 5 rows and 3 columns".
Answered 1 days AfterMar 01, 2022

Answer To: Biostatistics & Computational Analysis RSTUDIO 1. Write a program to take a positive whole number...

Suraj answered on Mar 02 2022
108 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here