R 如何将输出插入命令行/函数

R 如何将输出插入命令行/函数,r,R,我已输出(“1b”“2b”“3b”“40b”),然后将这些值插入到函数中进行进一步计算。我正在用下面的代码准备这些值 # delete column names names(profile.ab) <- NULL # insert comma between values (profile.ab<-sub("([[:digit:]]{1,1})$", "\\1,", profile. ab)) # remove comma from last item profile.ab [5

我已输出(“1b”“2b”“3b”“40b”),然后将这些值插入到函数中进行进一步计算。我正在用下面的代码准备这些值

# delete column names
names(profile.ab)  <- NULL
# insert comma between values
 (profile.ab<-sub("([[:digit:]]{1,1})$", "\\1,", profile. ab))
# remove comma from last item
profile.ab [50] = "2"
# remove quotations
noquote(profile. ab)
# delete leading bracketed numbers
cat(profile.ab, "\n")
#删除列名

名字(profile.ab)你试过用profile.ab调用你的函数吗?例如,像这样的
YourFunction(profile.ab)
?括号中的前导数字只是漂亮的打印出来的,它们实际上并不在数据中,因此,
cat
可能不需要。尝试使用函数调用它,但没有goI删除了前导括号,因为我正在从输出中剪切并粘贴回命令行。我知道数据中没有括号