我正在使用magrittr库在R中使用管道。我需要在两个管道之间使用for循环,我该怎么做
oracle.jdbc.driver.OracleDriver
它把我扔了
inherits(x,“ flextable”)中的错误: 参数“ x”丢失,没有默认值
答案 0 :(得分:1)
答案 1 :(得分:1)
只需预定义函数:
foo <- function(x){
for (ii in 2:length(species))
{
group_result <- group_vector(tm.rank.out.temp, grp.type, species[ii])
for (jj in 1:length(group_result))
{
text_color <- grp.clr[[unique(grp.type[,grp][jj])]]
color(i = group_result[[jj]], j = ~ species[ii], color = text_color)
}
}
}
tmrank.ft <- regulartable(
data = tm.rank.out) %>%
theme_booktabs() %>%
autofit() %>%
merge_v(j=missing_species) %>%
align(align = 'center') %>%
align(align = 'center', part = 'header') %>%
bold(part = 'header') %>%
height(height = 1, part = 'header') %>%
fontsize(size = 14, part = 'all') %>%
width(j=1, width = 1.0 ) %>%
width(j=2:ncol(tm.rank.out), width = 2.5) %>%
foo()