my_function <- function() {
# 在这里输入需要计算的数学表达式
# 例如:
result1 <- 2 + 3 + 4
result2 <- cos(pi/2)
result3 <- sqrt(49)
# 将结果存储在一个向量中并返回
result_vector <- c(result1, result2, result3)
return(result_vector)
}
# 调用函数并打印结果
print(my_function())