graphics - How to create Lines connecting two points in R -


is there way create lines in r connecting 2 points? aware of lines(), function, creates line segment looking infinite length line.

here's example of martha's suggestion:

set.seed(1) x <- runif(2) y <- runif(2)  # function segmentinf <- function(xs, ys){   fit <- lm(ys~xs)   abline(fit) }  plot(x,y) segmentinf(x,y) 

enter image description here


Comments

Popular posts from this blog

Capture and play voice with Asterisk ARI -

java - Why database contraints in HSQLDB are only checked during a commit when using transactions in Hibernate? -

visual studio - Installing Packages through Nuget - "Central Directory corrupt" -