Difference between revisions of "R: Menggunakan library CRAN"

From OnnoWiki
Jump to navigation Jump to search
 
Line 34: Line 34:
 
  txtbarchart(x)
 
  txtbarchart(x)
  
 +
 +
==Referensi Packages==
 +
 +
* https://cran.r-project.org/web/packages/available_packages_by_date.html
 +
* https://cran.r-project.org/web/packages/available_packages_by_name.html
  
  

Latest revision as of 05:38, 28 October 2018

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