data=read.table("survey_99164_data_file.csv", sep=",", quote = "'", na.strings="") names(data)=paste("V",1:dim(data)[2],sep="") data[,which(names(data)=="V1")]=as.numeric(data[,which(names(data)=="V1")]) data[,which(names(data)=="V2")]=as.numeric(data[,which(names(data)=="V2")]) data[,which(names(data)=="V3")]=as.numeric(data[,which(names(data)=="V3")]) #Define Variable Properties. attributes(data)$variable.labels[which(names(data)=="V1")]="id" attributes(data)$variable.labels[which(names(data)=="V2")]="Question 1" attributes(data)$variable.labels[which(names(data)=="V3")]="Question 2" #Define Value labels. v.names=c("id","Q1","Q2",NA); names(data)= v.names[-length(v.names)] print(str(data))