[R] Remove thw data from the dataframe

2011-11-14 Thread arunkumar1111
Hi,
 
 I want to remove the entire row from the dataset if any of the row contains
blank or NA 

my dataset look like

State   YearY   X2  X3  X4  X5  X6
State1  196027.8397.5   42.250.778.365.8
State2  196029.9413.3   38.152  79.266.9
State1  196129.8439.2   40.354  79.267.8
State2  196130.8459.7   39.579.269.6
State1  196231.2492.9   37.354.777.468.7
State2  1962528.6   38.180.273.6
State1  196335.6560.3   39.369.880.476.3
State2  196336.4624.6   37.865.977.2
State1  1964666.4   38.464.585.578.1
State2  196438.4717.8   40.193.784.7
State1  196540.4768.2   38.673.293.3
State2  196540.339.867.8104.8   89.7

I want to remove the entire row from the dataset if any of the rows have
blanks or NA 


--
View this message in context: 
http://r.789695.n4.nabble.com/Remove-thw-data-from-the-dataframe-tp4041903p4041903.html
Sent from the R help mailing list archive at Nabble.com.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] Remove thw data from the dataframe

2011-11-14 Thread R. Michael Weylandt
I'm not aware of a way that one can have blank data.frame elements
in Rsomething about this seems mighty suspicious...

For the NA's, if you wish to omit them, I might suggest na.omit()

I don't know if you've seen this, but you should have a look at the
apropos() command. Very helpful

Michael



On Mon, Nov 14, 2011 at 11:50 PM, arunkumar akpbond...@gmail.com wrote:
 Hi,

  I want to remove the entire row from the dataset if any of the row contains
 blank or NA

 my dataset look like

 State   Year    Y       X2      X3      X4      X5      X6
 State1  1960    27.8    397.5   42.2    50.7    78.3    65.8
 State2  1960    29.9    413.3   38.1    52      79.2    66.9
 State1  1961    29.8    439.2   40.3    54      79.2    67.8
 State2  1961    30.8    459.7   39.5            79.2    69.6
 State1  1962    31.2    492.9   37.3    54.7    77.4    68.7
 State2  1962            528.6   38.1            80.2    73.6
 State1  1963    35.6    560.3   39.3    69.8    80.4    76.3
 State2  1963    36.4    624.6   37.8    65.9            77.2
 State1  1964            666.4   38.4    64.5    85.5    78.1
 State2  1964    38.4    717.8   40.1            93.7    84.7
 State1  1965    40.4    768.2   38.6    73.2            93.3
 State2  1965    40.3            39.8    67.8    104.8   89.7

 I want to remove the entire row from the dataset if any of the rows have
 blanks or NA


 --
 View this message in context: 
 http://r.789695.n4.nabble.com/Remove-thw-data-from-the-dataframe-tp4041903p4041903.html
 Sent from the R help mailing list archive at Nabble.com.

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.