什麼是繪製簡單的曲線像如何繪製R中
eq = function(x){x*x}
R中
功能選擇呢?
這聽起來這樣一個明顯的問題,但我只找到計算器這些相關的問題,但他們都更具體
- Plot line function in R
- Plotting functions on top of datapoints in R
- How can I plot a function in R with complex numbers?
- How to plot a simple piecewise linear function?
- Draw more than one function curves in the same plot
我希望我沒有寫出重複的問題。
有趣的是,我沒有看到你的例子'plot(eq,1,1000)'在其他地方。我還看到了'curve(eq,1,100)'例子。有區別嗎? – sjdh 2014-09-29 01:33:52
@sjdh不多。在做一些參數檢查後,'plot.function'實際上調用'curve'。另外,'curve'可以將一個表達式作爲輸入,但'plot'需要一個函數作爲輸入來分派到'plot.function' – GSee 2014-09-29 01:41:53