Its just a simple question I guess: I have a vector with missing information like x<-c(0,1,31,131,NA,133,NA,310,NA,112,3,1,2,93) How can I make a vector like this no missing in it. I used the x[x<0] commabd and tried some more, with no success. thx Korbinian
Hi, Korbinian von Blanckenburg wrote:> Its just a simple question I guess: > > I have a vector with missing information like > x<-c(0,1,31,131,NA,133,NA,310,NA,112,3,1,2,93) > > How can I make a vector like this no missing in it. I used the x[x<0] > commabd and tried some more, with no success.Try na.omit() HTH, Kevin -- Ko-Kang Kevin Wang PhD Student Centre for Bioinformation Science Building 27, Room 1004 Mathematical Sciences Institute (MSI) Australian National University Canberra, ACT 2601 Australia Homepage: http://wwwmaths.anu.edu.au/~wangk/ Ph (W): +61-2-6125-2431 Ph (H): +61-2-6125-7488 Ph (M): +61-40-451-8301
Em S??b 22 Out 2005 10:07, Korbinian von Blanckenburg escreveu:> Its just a simple question I guess: > > I have a vector with missing information like > x<-c(0,1,31,131,NA,133,NA,310,NA,112,3,1,2,93) > > How can I make a vector like this no missing in it. I used the x[x<0] > commabd and tried some more, with no success. > > thx > Korbinian >Hi, try this: x[is.na(x)==FALSE] Inte Ronaldo -- There is a fly on your nose. -- |> // | \\ [***********************************] | ( ?? ?? ) [Ronaldo Reis J??nior ] |> V [UFV/DBA-Entomologia ] | / \ [36570-000 Vi??osa - MG ] |> /(.''`.)\ [Fone: 31-3899-4007 ] | /(: :' :)\ [chrysopa at insecta.ufv.br ] |>/ (`. `'` ) \[ICQ#: 5692561 | LinuxUser#: 205366 ] | ( `- ) [***********************************] |>> _/ \_Powered by GNU/Debian Woody/Sarge