我用
library("openxlsx")
writeFormula (wb , sheet = "data" ,
x = c ("SUM(A2:A4)", "AVERAGE(B2:B4)", "MEDIAN(C2:C4)") ,sep='')) ,
startCol = "X" , startRow = 4 )
在 Excel 中,我看到:
1. =SUM(A2:A4)
2. =AVERAGE(B2:B4)
3. =MEDIAN(C2:C4)
但我想用 {} 编写公式并在 Excel 中获取它:
1. {=SUM(A2:A4)}
2. {=AVERAGE(B2:B4)}
3. {=MEDIAN(C2:C4)}
我怎样才能做到这一点?