标签: r r-s3
为什么这样做
print.character = function(x) cat("Use cat instead!", x) print("tre") # Use cat instead! tre
但这会引发错误?
"+.character" = function(lhs, rhs) paste0(lhs, " + ", rhs) "tre" + "tri"
错误" tre" +"三" :二元运算符的非数字参数