[R] Very basic statistics in R
Rui Barradas
ruipbarradas at sapo.pt
Thu May 9 00:38:11 CEST 2013
Hello,
Or, to make it complete, use the na.rm argument.
sd(vec1, na.rm = TRUE)/sqrt(sum(!is.na(vec1)))
Rui Barradas
Em 08-05-2013 20:55, peter dalgaard escreveu:
>
> On May 8, 2013, at 20:38 , Robert Baer wrote:
>
>> On 5/6/2013 7:02 AM, arun wrote:
>> stErr<- sd(vec1)/sqrt(length(vec1))
>>
>> Or possibly,
>>
>> stErr<- sd(vec1)/sqrt(!is.na(vec1))
>>
>
> You probably intended sqrt(sum(!is.na(...))).
>
More information about the R-help
mailing list