我有一个名为"foo"
的数据框,其内容如下:
> foo <-c(3,4);
我想要做的是将"foo"
转换为字符串。这样在函数中,我就不必再创建额外的变量了。
output <- myfunc(foo)
myfunc <- function(v1) {
# do something with v1
# so that it prints "FOO" when
# this function is called
#
# instead of the values (3,4)
return ()
}
exists()
需要一个字符串。 - Elin