R: Menggunakan library CRAN

From OnnoWiki
Revision as of 05:38, 28 October 2018 by Onnowpurbo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Menggunakan library, contoh (txtplot)

install.packages('txtplot')
library('txtplot')

Menggunakan datasets yang ada di txtplot

txtplot(cars[,1], cars[,2], xlab = "speed", ylab = "distance")

Help

help(txtplot)

Contoh program

## basic plotting function
require(stats)
txtplot(cars[,1], cars[,2])
## can include axis labels when desired
txtplot(cars[,1], cars[,2], xlab = "speed", ylab = "distance")
    
## text based density plot
txtdensity(rnorm(500))
    
## text based plotting of functions
txtcurve(x/(x+1), 0, 4, xlab = "Emax model")
    
## text based acf
txtacf(rnorm(100))
    
## text based barchart
x <- factor(c("orange", "orange", "red", "green", "green", "red",
             "yellow", "purple", "purple", "orange"))
txtbarchart(x)


Referensi Packages


Pranala Menarik