1) Write a R program to create a sequence of numbers from 20 to 50 and find the mean of numbers from 20 to 60 and sum of numbers from 51 to 91 2) Write a R program to get the first 10 Fibonacci...

1 answer below »
Only Question 5


1) Write a R program to create a sequence of numbers from 20 to 50 and find the mean of numbers from 20 to 60 and sum of numbers from 51 to 91 2) Write a R program to get the first 10 Fibonacci numbers 3) Write a R program to get all prime numbers up to a given number 4) Write a R program to print the numbers from 1 to 100 and print "Fizz" for multiples of 3, print "Buzz" for multiples of 5, and print "FizzBuzz" for multiples of both 5) The below table shows the results of RNA-Seq on cancer samples being treated with three different types of treatment (A, B, and P). You have a total of 12 samples, with four replicates per treatment: Sex Stage Treatment Myc sample1 M I A 2343 sample2 F II A 457 sample3 M II A 4593 sample4 F I A 9035 sample5 M II B 3450 sample6 F II B 3524 sample7 M I B 958 sample8 F II B 1053 sample9 M II P 8674 sample10 F I P 3424 sample11 M II P 463 sample12 F II P 5105 − Transfer this table to excel and create a .xlsx file in your working directory. − From the R program, import and read the created excel file (with any command you think better suite your needs) and then save it in a data frame with the name “RNA_Seq_Results” − Using the RNA_Seq_Results data frame, write out the R code to perform the following operations: a. Define another data frame with the name “M_Data” that only includes the data in columns two to four of RNA_Seq_Results data frame b. Use if and for commands only to extract all data in the M_Data data frame for those samples receiving treatment P c. Remove the treatment column from the RNA_Seq_Results data frame (hint: use []) d. Add a column called pre_treatment to the beginning of the RNA_Seq_Results with the values [T, F, F, F, T, T, F, T, F, F, T, T] (Hint: use cbind()) e. Use if and for commands only to calculate the minimum, maximum, and mean of the numbers in the “Myc” column. DO NOT use ready functions such as min(), max(), mean(). f. We want to write a program that can provide us with information about the Stage. Currently, our study only includes 12 samples, and it is easy to look at column 3 (i.e., stage column) to obtain the total number of samples that are in Stage I (4) or Stage II (8). You agree that if the size of this table increases to include 100000000 cases instead of 12, then it is not as easy to do this task manually. Write an R script to extract the total number of samples in Stage I or II.
Answered Same DayJan 29, 2022

Answer To: 1) Write a R program to create a sequence of numbers from 20 to 50 and find the mean of numbers from...

Abhishek answered on Jan 30 2022
117 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