我正在使用tidyr软件包中的fill()函数。fill(df, colname1, colname2, colname3)
操作正常,但当我遇到一个有32个变量的数据集时出现问题。请问如何在不输入每个变量名称的情况下,填充所有列?
我尝试过:
fill(df,colnames(df)),
fill(df,1:32),
fill(df,colname1:colname32).
并且产生了以下错误:
Error: All select() inputs must resolve to integer column positions.
The following do not:
* colnames(df1)
Error: tinyformat: Not enough conversion specifiers in format string
Error: tinyformat: Not enough conversion specifiers in format string