Km_plot <- function(tumor = "GBM", + measure = "OS", + best_cutoff = TRUE, + cutpoint = 50, + legend_pos = "right"){ + sss_can <- sss[【tumor】] %>% dplyr::select(c("sample","values",measure,paste0(measure, ".time"))) 错误: unexpected input 于 " legend_pos = "right"){ sss_can <- sss[【"
理解问题Km_plot <- function(tumor = "GBM", + measure = "OS", + best_cutoff = TRUE, + cutpoint = 50, + legend_pos = "right"){ + sss_can <- sss[【tumor】] %>% dplyr::select(c("sample","values",measure,paste0(measure, ".time"))) 错误: unexpected input 于 " legend_pos = "right"){ sss_can <- sss[【"
已完成理解「Km_plot <- function(tumor = "GBM", + measure = "OS", + best_cutoff = TRUE, + cutpoint = 50, + legend_pos = "right"){ + sss_can <- sss[【tumor】] %>% dplyr::select(c("sample","values",measure,paste0(measure, ".time"))) 错误: unexpected input 于 " legend_pos = "right"){ sss_can <- sss[【"」
展开阅读网页
1. 函数定义错误:在R语言中,函数定义时使用<-
进行赋值,但您的代码中Km_plot
函数定义存在语法错误。
2. 错误的符号使用:代码中的【tumor】
和【"
符号不是有效的R语言代码,应使用英文的方括号[]
和双引号"
。
3. 正确的函数定义:应将Km_plot <- function(tumor = "GBM", ...
中的【tumor】
替换为tumor
,并且去掉【"
和"】
。
修正后的函数定义如下:
Km_plot <- function(tumor = "GBM",
measure = "OS",
best_cutoff = TRUE,
cutpoint = 50,
legend_pos = "right"){
sss_can <- sss[tumor] %>% dplyr::select(c("sample", "values", measure, paste0(measure, ".time")))
# 其他代码...
}