title: Normalizing data in R
body: <p>Currently I am studying QDA and am using R software to analyze my data. </p>
  
  <p>The data was downloaded from the below link: </p>
  
  <p><a href="https://www.kaggle.com/uciml/pima-indians-diabetes-database" rel="nofollow noreferrer">https://www.kaggle.com/uciml/pima-indians-diabetes-database</a></p>
  
  <p>I want to check the QDA assumption i.e. the two groups are multivariate normally distributed, hence have used the below command in R.</p>
  
  <pre><code>library(MVN)    
  group1 &lt;- discrim[1:500, 1:8]
  result&lt;- mardiaTest(group1, qqplot = FALSE) #To check whether our data from group1 is MND    
  group2 &lt;- discrim[501:765, 1:8]    
  result2 &lt;- mardiaTest(group2, qqplot= TRUE)#To check whether our data from group2 is MND
  </code></pre>
  
  <p>Both groups are non-normally distributed, so I want to normalize the data and have coded the below to normalize the data for the first group.</p>
  
  <pre><code>x1bar &lt;- t(t(as.vector(sapply(as.data.frame(group1),mean))))    
  x1bartilda&lt;- (x1bar - mean(x1bar))/sd(x1bar)
  </code></pre>
  
  <p>Similarly for group2, however mean vector X for group1 didn't give a result that is close to 0. </p>
  
  <p>Can anyone help me what is the way forward please?</p>