R 函数构造练习

name <- rownames(rt_expr)   #基因名

immune <- function(genename){
    y <- as.numeric(rt_expr)    #单一基因的表达量表格
    do.call(rbind,lapply(colnames(rt),function(x){    #rt列明与rt_expr的行名相同 
        test <- cor.test(rt[,x],y,type="spearman")
        cor <- test$estimate
        p.value <- test$p.value

data <- immune(name)

compute <- function(x,y,d=2){

R 函数构造练习》有1条回应

  1. 周捷说:



电子邮件地址不会被公开。 必填项已用*标注

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

Protected with IP Blacklist CloudIP Blacklist Cloud