#1--------------------------------------
ifname<-"DataAllDescriptors.csv"
alldata <- read.delim(ifname, row.names=1, header=T, sep= ",")
class(alldata)
mdata<-as.matrix(alldata)
class(mdata); dim(mdata)
#2--------------------------------------
sdata<-scale(mdata)
csd<-apply(mdata,2,sd)
non_zero_std_columns <- csd!=0
rmdata <- mdata[,non_zero_std_columns]
dim(rmdata)
#3-----------------------------------
dataUsed<-scale(rmdata)
pthold<-3; nthold<-pthold*(-1)
dim(dataUsed)
#4----------------------------------
xxx<-(nthold>dataUsed|pthold<dataUsed)
dim(xxx)
tsum<-apply(xxx,1,sum)
head(tsum)
table(tsum)
nmax<-max(tsum); nmax
hist(tsum,breaks = c(-1:nmax))
sig_rows <- tsum!=0
selectdata<-dataUsed[sig_rows,]
dim(selectdata)