Tuesday, January 1, 2019

. How to R used for plot

   How to R used for plot

> x = -5:5
> y = 5*cos(x)
> op = par(mfrow=c(3,2))
> plot(x, main="plot(x)")
> plot(x, y, main="plot(x,y)")
> plot.ts(x, main="plot.ts(x)")
> plot.ts(x, y, main="plot.ts(x,y)")
> ts.plot(x, main="ts.plot(x)")
> ts.plot(ts(x), ts(y), col=1:2, main="ts.plot(x,y)")

https://www.r-languagestatistics.co


No comments:

Post a Comment

Black-Scholes formula-R

 Black-Scholes formula-R > BlackScholes <- function(TypeFlag = c("c", "p"), S, X, Time, r, b, sigma) { TypeFla...