Yup you're right, after posting i took a better look at the
subsetting, found the problem and post again, my bad...
2009/10/27 Duncan Murdoch :
> On 27/10/2009 2:58 PM, marcos carvajalino wrote:
>>
>> Dear ms.
>>
>> The most possible reason for this:
>>
>>> Dear all
>>> I am trying to learn R
>>>
On 27/10/2009 2:58 PM, marcos carvajalino wrote:
Dear ms.
The most possible reason for this:
Dear all
I am trying to learn R
I was trying to calculate standard deviation
here are the commands and outputs in R
sd(Ht_cm[type=='SD'])[1] 3.283605> sd(Ht_cm[from_treeline=='above'])[1] 16.83289>
>
Hi ms.
also try this:
sd(Ht_cm[type=='SD' && from_treeline=='above'])
cause i think you can't use [][] two apply 2 conditions to a data
frame, in that cases you should use an AND (&&) conector like above
2009/10/27 marcos carvajalino :
> Dear ms.
>
> The most possible reason for this:
>
>>Dear
Dear ms.
The most possible reason for this:
>Dear all
>I am trying to learn R
>I was trying to calculate standard deviation
>here are the commands and outputs in R
>> sd(Ht_cm[type=='SD'])[1] 3.283605> sd(Ht_cm[from_treeline=='above'])[1]
>> 16.83289> >sd(Ht_cm[type=='SD'][from_treeline=='above'
Dear MS,
please follow the posting guide and provide reproducible lines of code !
Like this I have no idea what's inside your Ht_cm object .
Maybe the problem is that your data might contain NAs, since the basic
formula doesn't allow missing values. In this case you have to specify
how the fu
On 10/26/2009 11:05 AM, hadley wickham wrote:
What are the values of
length((Ht_cm[type=='SD'][from_treeline=='above'])[1])
I suspect the error is in the subsetting - the following seems more plausible:
Ht_cm[type=='SD' && from_treeline=='above']
But don't double that ampersand: use
Ht_
> What are the values of
>
> Ā length((Ht_cm[type=='SD'][from_treeline=='above'])[1])
I suspect the error is in the subsetting - the following seems more plausible:
Ht_cm[type=='SD' && from_treeline=='above']
Hadley
--
http://had.co.nz/
__
R-help@r-p
On 26-Oct-09 09:44:55, ms.com wrote:
>
> Dear all
> I am trying to learn R
> I was trying to calculate standard deviation
> here are the commands and outputs in R
>> sd(Ht_cm[type=='SD'])[1] 3.283605
>> sd(Ht_cm[from_treeline=='above'])[1] 16.83289
>> sd(Ht_cm[type=='SD'][from_treeline=='above'])[
Dear all
I am trying to learn R
I was trying to calculate standard deviation
here are the commands and outputs in R
> sd(Ht_cm[type=='SD'])[1] 3.283605> sd(Ht_cm[from_treeline=='above'])[1]
> 16.83289> sd(Ht_cm[type=='SD'][from_treeline=='above'])[1] NA>
the problem is that, i could not unders
9 matches
Mail list logo