我已閱讀format.pval
的幫助文件,並且想知道這是否是一種正確的工具,只要有效數字與正確的格式輸出數字R中使用format.pval(並且在Sweave中使用 Sexpr)
在這篇文章:
R/Sweave formatting numbers with \Sexpr{} in scientific notation
的解決方案提出了,我不知道如果函數format.pval
已經在這裏做到這一點。
我想我們可以在Sweave中使用它作爲\Sexpr{format.pval(a value/variable here)}
以及有效位數的選項。
非常感謝...
'format.pval'使用'format'這是目的較爲一般。所以你應該使用'format','prettyNum'或'formatC'來代替。 – Andrie
@ Andrie謝謝。你可以考慮在這個解決方案中轉換你的評論嗎? 1投票。 – yCalleecharan