LinkedIn link GitHub link Twitter link

HELLO woRld

Hello World!

library(dplyr)
# This is a new example:
histData <- head(mutate(
  iris, 
  Petal.Ratio = Petal.Length / Petal.Width
))
calcExample <- (132 * 2) ^ 2
myFun <- function(x, y) {
  if (x > 0)
    return(TRUE)
  else
    return(y)
}
histData$Petal.Ratio %>% 
  hist(col = "green", main = "Histogram of petal.ratio", xlab = "petal.ratio")
  • More examples to follow
  • Comments to be provided through new news-comments email link
head(mutate(
  iris, 
  Petal.Ratio = Petal.Length / Petal.Width
))$Petal.Ratio %>% 
  hist(col = "green", main = "Histogram of petal.ratio", xlab = "petal.ratio")

With line-numbers:

1
2
3
4
5
6
7
8
try(detach("package:dplyr"), silent = TRUE)
library(data.table, quietly = TRUE)
library(magrittr)
dTab <- data.table(iris)
head(
  dTab[, Petal.Ratio := Petal.Length / Petal.Width]
)$Petal.Ratio %>% 
  hist(col = "blue", main = "Histogram of petal.ratio", xlab = "petal.ratio")