Skip to content

Instantly share code, notes, and snippets.

@songhuiming
Created December 7, 2012 03:10
cat("\014")
rm(list=ls())
seo_rev=read.csv("D:\\hsong\\SkyDrive\\Public\\seo_kw_rev_train.csv", header=T, skip=2, na.string='.')
names(seo_rev)<-tolower(names(seo_rev))
lapply(seo_rev, class)
str(seo_rev)
head(seo_rev)
all_var<-colnames(seo_rev)
## check which variables have missing value, and how many of the values are missing
getna<-function(x) sum(is.na(x)>0)
apply(seo_rev, 2, getna)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment