Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Define geneExpr=data.frame(gene=LETTERS[1:10], expr1=c(2.1, 4.5, 6.8, 7.9, 8.1, 5.0, 4.6, 3.2, 3.5, 7.8), expr2=c(6.1, 4.2, 2.8, 0.9, 0.1, 3.0, 2.6, 8.2, 3.4, 6.8)). Give the results
Define geneExpr=data.frame(gene=LETTERS[1:10], expr1=c(2.1, 4.5, 6.8, 7.9, 8.1, 5.0, 4.6, 3.2, 3.5, 7.8), expr2=c(6.1, 4.2, 2.8, 0.9, 0.1, 3.0, 2.6, 8.2, 3.4, 6.8)). Give the results of the following R commands:
a) counter<-0 for (i in 1:length(geneExpr)) { if (geneExpr[i,2]<=7){ counter<-counter+1 } } print(counter)
b) myMin<-function(x, cut) { min(x[x>cut]) } apply(geneExpr[,-1],2, myMin, cut=4)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started