[R] Deleting the last value of a vector

2011-04-17 Thread empyrean
Hey guys,

I've search a few threads about deleting a value from a vector, but no one
has addressed this question so far.

I want to delete the last value from a string of values

I have:

r = [ 1, 2, 3, 4, 5 ], and i want to make r2 = to [ 1, 2, 3, 4]

So that r2 is just like r, except that it missing the final value. 

Thanks,

--
View this message in context: 
http://r.789695.n4.nabble.com/Deleting-the-last-value-of-a-vector-tp3456363p3456363.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] How to delete an entire row, if a specific colum has the value of "#VALUE!"

2011-04-22 Thread empyrean
I am importing CSV data with thousands of rows, if any row contains an error
from excel, the whole program crashes, so i need to delete all rows with the
value of #VALUE!, all other values are non-numeric... 

I've tried a bunch of strategies, but nothing seems to work.

Thanks ahead of time guys,

Best,

Cody

--
View this message in context: 
http://r.789695.n4.nabble.com/How-to-delete-an-entire-row-if-a-specific-colum-has-the-value-of-VALUE-tp3469282p3469282.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.