# 定义函数 my_function <- function(a, b){ return(paste(a, b, sep = "|")) } # 调用函数 result <- my_function("hello", "world") print(result)
输出结果为:
[1] "hello|world"
上一篇:编写一个函数,返回一句话中笑脸表情的数量加1。
下一篇:编写一个函数,返回字符串中两个索引之间的子集。