% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/removeNA.R
\name{removeNA}
\alias{removeNA}
\title{removeNA}
\usage{
removeNA(form, data)
}
\arguments{
\item{form}{a list of formula}

\item{data}{a data frame containing all variables mentionned in form}
}
\value{
a list containing
 \item{newdata}{a data frame created from data, containing only the variables used in the formula, and without any missing values}
 \item{Y}{the names of the response variables}
 \item{YlinesNA}{the lines removed from each response variables}
 \item{nmes}{the number of measures for each response variable}
 \item{X}{the names of the covariates}
 \item{XlinesNA}{the lines removed from data because of missing values in the covariates}
}
\description{
Remove missing values
}
\details{
Caution : if several response variables are included in 'form', then the resulting data frame will contain one column (named outcome) grouping all these response variables. The irst lines will refer to the first response variables, a second block to the second, etc. All covariates will be repeated for each response variable.
}
\examples{
 d <- data.frame(y1=c(3,6,4,2), y2=c(6.5,NA,9.5,4.5), x=c(0,0,1,0))
 removeNA(form=list(y1+y2~x), data=d)
## 1      3.0 0   | first block referring to y1
## 2      6.0 0   |
## 3      4.0 1   |
## 4      2.0 0   |
## 11     6.5 0     | second block referring to y2
## 31     9.5 1     |
## 41     4.5 0     |

}
