[R] problems with which

Nicola Spotorno nicola.spotorno at isc.cnrs.fr
Sun Aug 15 14:03:31 CEST 2010


Hello,
thanks for your replies, but the logic operator is '!='. If I call 
sentence_trial the dataframe shows no 'an'  datapoints  as I want but I 
still have problems with 'str' and 'interaction_plot'.

Nicola


Tim Gruene ha scritto:
> Isn't '!=' the operator applied here, not '='?
>
>
> On Sun, Aug 15, 2010 at 09:04:46PM +1000, Michael Bedward wrote:
>   
>> Hello Nicola,
>>
>>     
>>> sentences_trial <- sentences[which(sentences$Cond!= "an"),]
>>>       
>> That should be == "an" instead of = "an"
>>
>> == is the test for equality whereas = is assignment
>>
>> Michael
>>
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>     
>
>



More information about the R-help mailing list