Welcome to R Barbara. Its quite an incredible community from all walks of
life.
Your beginner questions are answered in the manual. See Introduction to R.
Please read the posting guide again because it contains lots of good advice
for you. Some people read it three times before posting because
barbara.r...@uniroma1.it wrote:
I have a vector that have null elements. How to remove these elements?
For example:
x=[10 0 30 40 0 0] I want the vector y=[10 30 40]
Thanks
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing li
x <- x[x != 0]
If for null elements you intend the value of zero.
Ciao!
mario
On 09-Mar-10 13:48, barbara.r...@uniroma1.it wrote:
I have a vector that have null elements. How to remove these elements?
For example:
x=[10 0 30 40 0 0] I want the vector y=[10 30 40]
Thanks
Hi Barbara,
Try
x[ x != 0 ]
HTH,
Jorge
On Tue, Mar 9, 2010 at 7:48 AM, <> wrote:
>
> I have a vector that have null elements. How to remove these elements?
> For example:
> x=[10 0 30 40 0 0] I want the vector y=[10 30 40]
> Thanks
>[[alternative HTML version deleted]]
>
> ___
I have a vector that have null elements. How to remove these elements?
For example:
x=[10 0 30 40 0 0] I want the vector y=[10 30 40]
Thanks
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/l
5 matches
Mail list logo