如何用基础 R 创建箭头?
为了用 R 创建一个箭头,我们可以使用 plot 函数和 arrows 函数。我们只需要了解应在 arrows 函数中传递的所有坐标值。例如,如果我们有包含 1 到 10 的值的两个向量,那么可以通过使用 arrows 函数 arrows(1,1,10,10) 创建箭头。
示例
> x<-1:10 > y<-1:10 > plot(x,y)
输出

示例
> arrows(1,1,10,10)
输出

广告
为了用 R 创建一个箭头,我们可以使用 plot 函数和 arrows 函数。我们只需要了解应在 arrows 函数中传递的所有坐标值。例如,如果我们有包含 1 到 10 的值的两个向量,那么可以通过使用 arrows 函数 arrows(1,1,10,10) 创建箭头。
> x<-1:10 > y<-1:10 > plot(x,y)

> arrows(1,1,10,10)
