1

我已经在 R 中加载了 formula.tools。我现在想卸载它,但是当我运行detach('package:formula.tools', unload = T)这个包时仍然会影响as.character函数。例如,请参见下文。

谁能建议如何卸载 formula.tools 使其不受影响as.character

# Behaviour of applying as.character to a formula before loading formula tools
as.character(formula(y ~ x)) #"~" "y" "x"

# Behaviour after loading formula tools
library(formula.tools)
as.character(formula(y ~ x)) #"y ~ x"

# Detaching formula tools doesnt change the behaviour
detach('package:formula.tools', unload = T)
as.character(formula(y ~ x)) #still "y ~ x" 
4

0 回答 0