hello all!
i am trying to do something that seems incredibly simple, but since i am
new to splus, i'm having difficulty.
i have a vector of numbers, ranging from 1 to 7. i want to create a sum of
this vector based on a set of contingencies...for every instance of 1 through
3, add 0, for every instance of 4 or 5 add 1, for all values greater than
5 add 2...
so, i thought i'd use an if statement: (x in this case is the vector)
test_if(x<5)0 if(x=5)1,else 2
but i get an error message that i'm using 'if' illegally...
now if this vector were small, or if i didn't have to do it
over and over again, i'd just do it by hand, but neither case is true!
thank you in advance for your help
lmv
Laura Vaugeois Natural Resource Scientist/GIS Specialist
WA.DNR, Northwest Region
919 N. Township, Sedro-Woolley, WA 98284 (360) 856-3500 or (360) 902-1425
=============================================================
My interest is in the future because I'm going to spend the
rest of my life there. - C.F. Kettering
=============================================================
OPINIONS & ADVICE GIVEN ARE STRICTLY MY OWN AND DO NOT
REPRESENT THE OPINIONS OF THE WA DNR OR ANY OF IT'S OFFICERS.
=============================================================
"Those are my opinions. If you don't like them, I have others."
-Groucho Marx
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|