[R] matrix manipulation question

Stéphane Adamowicz stephane.adamowicz at avignon.inra.fr
Tue Mar 31 09:34:49 CEST 2015


Many thanks,

Stéphane

Le 30 mars 2015 à 10:42, peter dalgaard <pdalgd at gmail.com> a écrit :

> 
>> On 30 Mar 2015, at 09:59 , Stéphane Adamowicz <stephane.adamowicz at avignon.inra.fr> wrote:
>> 
>> 
>> However, in order to help me understand, would you be so kind as to give me a matrix or data.frame example where « complete.cases(X)== T » or « complete.cases(X)== TRUE » would give some unwanted result ?
> 
> The standard problem with T for TRUE is if T has been used for some other purpose, like a time variable. E.g., T <- 0 ; complete.cases(X)==T.
> 
> complete.cases()==TRUE is just silly, like (x==0)==TRUE or ((x==0)==TRUE)==TRUE). 
> 
> (However, notice that x==TRUE is different from as.logical(x) if x is numeric, so ifelse(x,y,z) may differ from ifelse(x==TRUE,y,z).) 
> 
> -- 
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
> 
> 
> 
> 
> 
> 
> 
> 



More information about the R-help mailing list