[R] IMPORTANT - To remove the null elements from a vector

Matthew Dowle mdowle at mdowle.plus.com
Tue Mar 9 15:57:28 CET 2010


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 they have so 
much respect for the community.  Sometimes they trip up over themselves to 
show they have read it.

Btw - just to let you know that starting your subject lines with "IMPORTANT" 
is considered by some people a demanding tone for free help. Not everyone, 
but some people. Two posts starting IMPORTANT within 5 minutes is another 
thing that a very large number of people around the world may have just seen 
you do.  I'm just letting you know, in case you were not aware of this.

You received answers from four people who clearly don't mind, and you have 
your answers. Was that your only goal in posting?  Did you consider there 
might be downsides?  This is a public list read by many people and one thing 
the posting guide says is that your questions are saved in the archives 
forever.  Just checking you knew that.  I wouldn't want you to reduce your 
reputation accidentally.  A future employer (it might be a company, or it 
might be a university) anywhere in the world might do a simple search on 
your name, and thats why you might not get an interview, because you had 
showed (in their minds) that you didn't have respect for guidlines. I would 
hate for something like that to happen, all just because you didn't know you 
were supposed to read the posting guide, it wouldn't be fair on you. So it 
would be very unfair of me to know that, and suspect that you don't, but not 
tell you about the posting guide, wouldn't it ?  I hope this information 
helps you.  It is entirely up to you.

r-help is a great way to increase your reputation, but it can reduce your 
reputation too.  By asking great questions, or even contributing, you can 
proudly put that on your CV and increase your chances of getting that 
interview, or getting that position.  I have seen on several CVs from 
students the text "please search for my name on r-help".  Just like 
everything you do in public, r-help is very similar. What you write, you 
write in the public domain, and you write it free of charge, and free of 
restriction.

All this applies to all us. When asking for help, and when giving help.

Matthew


<Barbara.Rogo at uniroma1.it> wrote in message 
news:OF1A8063A1.FC14F5FF-ONC12576E1.00466053-C12576E1.0046606A at Uniroma1.it...
>
> 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]]
>



More information about the R-help mailing list