\name{Corr}
\alias{Corr}
\title{
  Compute Correlations
}
\description{
  Matrix var_exp & var_obs should have the same dimensions except along posloop 
  where the length can be different (nexp & nobs).
  Corr computes correlation for each jexp in 1:nexp and each jobs in 1:nobs 
  which gives nexp x nobs correlation for each other grid point of the matrix. 
  The correlations are computed along the poscor dimension. If compROW is given,
   the correlations are computed only if rows along the (compROW)th dimension 
  are complete between limits[1] and limits[2], that  mean with no NA between 
  limits[1] and limits[2]. 
  Default: limits[1] = 1 and limits[2] = length(compROW dimension).
  The confidence interval is computed by a Fisher transformation.
  The significance level relies on a one-sided student-T distribution.
}
\usage{
  Corr(var_exp, var_obs, posloop = 1, poscor = 2, compROW = NULL, limits = NULL)
}
\arguments{
  \item{var_exp}{
    Matrix of experimental data.
  }
  \item{var_obs}{
    Matrix of observational data, same dimensions as var_exp except along 
    posloop.
  }
  \item{posloop}{
    Dimension nobs and nexp.
  }
  \item{poscor}{
    Dimension along which correlation are to be computed.
  }
  \item{compROW}{
    Data taken into account only if (compROW)th row is complete.
    Default = NULL.
  }
  \item{limits}{
    Complete between limits[1] & limits[2]. Default = NULL.
  }
}
\value{
  Matrix with c(length(posloop) in var_exp, length(posloop) in var_obs, 4, all
   other dimensions of var_exp & var_obs except poscor).
  The third dimension of length 4 corresponds to the lower limit of the  95% 
  confidence interval, the computed correlation, the upper limit of the 95% 
  confidence interval and the 95% significance level given by a one-sided 
  T-test.
}
\author{
  History:
  1.0  -  2011-04  (V. Guemas, \email{vguemas@ic3.cat})  -  Original code
}
\keyword{datagen}
