変数名を持つ次のデータ フレームがあります"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 ()
}