转换和切换功能

时间:2018-10-14 04:39:01

标签: function switch-statement

我陷入与使用switch()函数有关的问题。实际上,我的代码如下:

inches <- function(n=1) {

    convert <— switch(n, n = n*whatever the number is 

    convert

}

但不起作用。我想这是因为他在我要他考虑n的值的同时寻找n。有人可以解决这个问题吗?

非常感谢

0 个答案:

没有答案