R

less than 1 minute read

Reading CSV Files

One column:

  v <- scan("fname.csv")

Multi columns:

  tbl <- read.cvs("myfile.csv", head=TRUE)
  tbl <- read.file("simple.csv",head=TRUE,sep=",")

Histograms

  v <- scan("mydata.csv")
  hist(v, breaks=100)

Statistical Tests

Kolmogorov-Smirnov Test

  x<-scan("mydata.csv")
  ks.test(x,function(x) pnorm(x,mean=mean(x),sd=sd(x)))

Wilcoxon Test

  val<-scan("values.csv")
  ref<-scan("reference.csv")
  wilcox.test(val, ref, paired=TRUE)

Mann-Withney-U Test

  val<-scan("values.csv")
  ref<-scan("reference.csv")
  wilcox.test(val, ref)

Inter Rater Agreement - Kappa Test

You need to install the irr package to use this test:

  install.packages("irr")
  library(irr)

  print("Tagger#0")
  ratings <- read.csv("rating-tagger#0.csv")
  kappam.fleiss(ratings, exact=TRUE, detail=TRUE )

References

Categories: ,

Updated:

Leave a comment