Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

R PROGRAMMING The below table shows the results of RNA-Seq on cancer samples being treated with three different types of treatment (A, B, and P).

R PROGRAMMING 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: sample1 sample2 sample3 sample4 sample5 sample6 sample7 sample8 sample9 sample10 sample11 sample12 Sex Stage Treatment Myc MI A 2343 F II A 457 M II A 4593 F I A 9035 M II B 3450 F II B 3524 M I B 958 F II B 1053 M II P 8674 F I P 3424 M II P 463 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.

KEEP GETTING ERROR CODES FOR THE LAST THREE. PLEASE HELP BEFORE I RIP MY HAIR OUT.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago