micresh / data-analytics-2019-KubSTU

0 stars 2 forks source link

LR-1 #4

Open micresh opened 5 years ago

micresh commented 5 years ago

lr1-rlab.pdf

micresh commented 5 years ago

https://github.com/micresh/data-analytics-2019-KubSTU/blob/master/lr1/train.csv

marwanka commented 5 years ago

m.k28<-read.csv("D:/MA1.csv",sep = ",") m.k28 View(m.k28) m<-m.k28[["m"]] m<-c(1,2,3,4,5,0,-1,-2,-3,-4,-5) mean(m) m.first<-ifelse(m>mean(m),1,-1) m.first m.second<-ifelse(m.first<mean(m),-1,1) m.second m.third<-ifelse(m == mean(m),0,1) m.third m.fourth<-ifelse(m == mean(m),7,0) m.fourth summary(m) hist(m,probability = TRUE, col = "red")