On 08.07.2011 18:20, VictorDelgado wrote:
ty S. Goslee,
It's helpfull to test the condition:
all.equal(s[4],0.15)
[1] TRUE
instead the previous "FALSE" answer obtained with
s[4]==0.15
[1] FALSE
but I still need get it to vector r:
Victor Delgado wrote:
for (w in 1:length(s)){
r[w]
ty S. Goslee,
It's helpfull to test the condition:
> all.equal(s[4],0.15)
[1] TRUE
instead the previous "FALSE" answer obtained with
>s[4]==0.15
[1] FALSE
but I still need get it to vector r:
Victor Delgado wrote:
>
>
>> for (w in 1:length(s)){
>> r[w] <- dados[,3][dados[,2]==s[w]][1]
>> }
Looks like FAQ 7.31 to me.
Try all.equal() instead of ==.
Sarah
On Fri, Jul 8, 2011 at 11:06 AM, VictorDelgado
wrote:
> Hi There,
>
> I'm facing one problem to construct a vector using the "for" command:
>
> I have one matrix named 'dados' (same as /data/ from portuguese), for
> example:
>
>> d
Hi There,
I'm facing one problem to construct a vector using the "for" command:
I have one matrix named 'dados' (same as /data/ from portuguese), for
example:
> dados[140:150,]
[,1] [,2] [,3]
[1,] 212.7298 0.14 0.11
[2,] 213.3778 0.14 0.11
[3,] 214.0257 0.15 0.11
[4,] 214.6737 0.1
4 matches
Mail list logo