How to create a Budget line in excel or R Im interested in programming a budget line or PPF which is responsive to changes in relative prices, and income effect.

I know the equation for the budget line is $$m\geq p_1x_1+p_2x_2$$
Lets say we have an Income of $m=100$ and prices $p_1=1$ and $p_2=2$.

How would I go about programming this into an excel spreadsheet or R?
Another R code that does it...

m &lt;- 100
p &lt;- c(1, 2) 
curve(m/p[2] - p[1]/p[2]*x, from = 0, to = m/p[1], lwd = 2,
      xlab = expression(x[1]),
      ylab = expression(x[2]))