(Ted Harding) wrote:
On 28-Jul-08 17:52:31, Henrik Bengtsson wrote:
Use '&' for vectors and '&&' for scalars. Ditto applies to the OR
operator(s). /Henrik
What's wrong with using "&" for scalars? Surely it gives the
correct answer? Maybe it's simply a bit slower, or something?
Se
Dear all,
may I suggest to include this quotation of Patrick Burns in the fortunes
package? :-)
Best,
Roland
Patrick Burns wrote:
A good reason to use '&&' rather than '&' is if evaluating
whatever is on the right will create an error if what is on
the left is FALSE. '&&' and '||' stop if
(Ted Harding) wrote:
On 28-Jul-08 17:52:31, Henrik Bengtsson wrote:
Use '&' for vectors and '&&' for scalars. Ditto applies to the OR
operator(s). /Henrik
What's wrong with using "&" for scalars? Surely it gives the
correct answer? Maybe it's simply a bit slower, or something?
Hi.
On Mon, Jul 28, 2008 at 11:21 AM, Ted Harding
<[EMAIL PROTECTED]> wrote:
> On 28-Jul-08 17:52:31, Henrik Bengtsson wrote:
>> Use '&' for vectors and '&&' for scalars. Ditto applies to the OR
>> operator(s). /Henrik
>
> What's wrong with using "&" for scalars? Surely it gives the
> correct a
See ?cut for creating a factor based on ranges of values.
Regards,
Wade Wall wrote:
>
> Hi all,
>
> I am trying to convert geometric means in a matrix to cover classes. My
> values are as such:
>
> perc<-c(0,0.025136418, 0.316227766, 1.414213562,3.16227766, 7.071067812,
> 15.8113883, 35.3
On 28-Jul-08 17:52:31, Henrik Bengtsson wrote:
> Use '&' for vectors and '&&' for scalars. Ditto applies to the OR
> operator(s). /Henrik
What's wrong with using "&" for scalars? Surely it gives the
correct answer? Maybe it's simply a bit slower, or something?
Ted.
> On Mon, Jul 28, 2008 at 1
And you may want to consider using the 'cut' function. In your case,
something like
veg_mean <- cut(veg_mean, breaks=c(0,.1,1,2,5,10,25,50,75,95,100),
right=FALSE)
should do the trick (see ?cut for more options).
Best,
Stefan
On 28 Jul 2008, at 19:52, Henrik Bengtsson wrote:
Use '&'
Hi,
maybe the following code helps to achieve what you want?
It seems to me it is basically a 'recode' question.
set.seed(1234) # not neccessary but this ensures we have the same
#results
random.values <- runif(n=30, min=0, max=100)
newgrouping <- cut(x=random.values, breaks=c(0,0.1, 1, 2, 5, 10
Use '&' for vectors and '&&' for scalars. Ditto applies to the OR
operator(s). /Henrik
On Mon, Jul 28, 2008 at 10:36 AM, Wade Wall <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I am trying to convert geometric means in a matrix to cover classes. My
> values are as such:
>
> perc<-c(0,0.025136418, 0
Hi all,
I am trying to convert geometric means in a matrix to cover classes. My
values are as such:
perc<-c(0,0.025136418, 0.316227766, 1.414213562,3.16227766, 7.071067812,
15.8113883, 35.35533906, 61.23724357, 84.40971508, 97.46794345)
cover<-c(0,1,2,3,4,5,6,7,8,9,10)
This is what I am tryin
10 matches
Mail list logo