zoukankan      html  css  js  c++  java
  • R语言实战

    > par(mfrow=c(2, 1))
    > d <- density(mtcars$mpg)
    > 
    > plot(d)
    > 
    > d <- density(mtcars$mpg)
    > plot(d, main="kernel density of miles per gallon")
    > polygon(d, col="red", border="blue")
    > rug(mtcars$mpg, col="brown")
    > 

    > par(lwd=2)
    > library(sm)
    > attach(mtcars)
    > 
    > cyl.f <- factor(cyl, levels=c(4,6,8), 
    +                 labels=c("4 cylinder", "6 cylinder", "8 cylinder"))
    > 
    > sm.density.compare(mpg, cyl, xlab="miles per gallon")
    > title(main="MPG Distribution by Car Cylinders")
    > 
    > colfill <- c(2:(1+length(levels(cyl.f))))
    > legend(locator(1), levels(cyl.f), fill=colfill)
    > 
    > detach(mtcars)
    > 
    

  • 相关阅读:
    gcd
    Kuglarz
    三分题解
    杜教筛
    第一组dp解题报告
    dp总结1
    cf-BitwiseXor
    6.6总结
    图论总结
    CF1309总结
  • 原文地址:https://www.cnblogs.com/wnzhong/p/7589158.html
Copyright © 2011-2022 走看看