Dorothea,

Im not familiar with this function, but perhaps something like this may
work... You should remove the lines where there are NA.

data2 <- data[-which(is.na(data[1:nrow(data),])),]

or you may want to take a look at complete.cases function

?complete.cases

but both will remove all lines in the data with any NA in it. It means that
if will analyze data from variable 2 and 3 and the line has NA only in
variables 4 and 5 then it will be removed anyway. Thus you may need to edit
a little you removing step.

Kind regards,

Abraço forte e que a força esteja com você,

Dr. Pedro Emmanuel A. A. do Brasil
Instituto de Pesquisa Clínica Evandro Chagas
Fundação Oswaldo Cruz
Rio de Janeiro - Brasil
Av. Brasil 4365
Tel 55 21 3865-9648
email: pedro.bra...@ipec.fiocruz.br
email: emmanuel.bra...@gmail.com

---Apoio aos softwares livres
www.zotero.org - gerenciamento de referências bibliográficas.
www.broffice.org ou www.openoffice.org - textos, planilhas ou apresentações.
www.epidata.dk - entrada de dados.
www.r-project.org - análise de dados.
www.ubuntu.com/ - sistema operacional


2010/8/11 <r-sig-epi-requ...@stat.math.ethz.ch>

> Send R-sig-Epi mailing list submissions to
>        r-sig-epi@stat.math.ethz.ch
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        https://stat.ethz.ch/mailman/listinfo/r-sig-epi
> or, via email, send a message with subject or body 'help' to
>        r-sig-epi-requ...@stat.math.ethz.ch
>
> You can reach the person managing the list at
>        r-sig-epi-ow...@stat.math.ethz.ch
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of R-sig-Epi digest..."
>
>
> Today's Topics:
>
>   1. problems with NA's (Dorothea Kirchner)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 11 Aug 2010 10:53:31 +0200 (CEST)
> From: Dorothea Kirchner <kirch...@uni-muenster.de>
> To: <r-sig-epi@stat.math.ethz.ch>
> Subject: [R-sig-Epi] problems with NA's
> Message-ID:
>        <
> permail-2010081108533180e26a0b00003ab5-kirch...@message-id.uni-muenster.de
> >
>
> Content-Type: text/plain; charset=us-ascii
>
> Hi,
>
> I try to calculate confidence intervals for SMRs using the pois.exact
> ()-function from the package "epitools". But I have some troubble with the
> NAs. How can I remove the NAs out of my analysis? It doesn't work if I set
> the
> argument: $CI<-pois.exact($SMR, na.rm = TRUE).
>
> Many thanks for your help
> Dorothea
>
>
>
> ------------------------------
>
> _______________________________________________
> R-sig-Epi mailing list
> R-sig-Epi@stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-epi
>
>
> End of R-sig-Epi Digest, Vol 44, Issue 1
> ****************************************
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Epi@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-epi

Reply via email to