Hi everyone, this is my first post!
I have little coding experience but am required in the next few weeks to do some statistical analysis using R. The problem I am having at the moment is:
I have generated some points from a Gaussian distribution using the code below :
sigma <- matrix(c(10,0,0,10), ncol=2)
a <- rmvnorm(n=500, mean=c(-3,0), sigma=sigma)
#Note the rmvnorm function is from the package mvtnorm.
I can plot a, however I would like to be able to work out the perpendicular distance of each point from a couple of vertical lines, however I have no idea how to do this... any suggestions?
Thanks
