gt; #208 buy 5 0
> #21 8 sample 4 1
> #228 buy 2 1
>
> A.K.
>
>
> - Original Message -
> From: arun
> To: vanessa van der vaart
> Cc: David Winsemius ; R help >
> Sent: Saturday, July 27, 2013 9:11
ate and sorted these
10. unique(unlist( #unlist the list and choose only the unique elements
11. dat[unique(unlist(,newColumn]<-1 # assign those rows that fits the
condition in newColumn as 1.
Hope it helps.
Regards,
A.K.
____
From: vanessa
buy 2 1
A.K.
- Original Message -
From: arun
To: vanessa van der vaart
Cc: David Winsemius ; R help
Sent: Saturday, July 27, 2013 9:11 PM
Subject: Re: [R] Duplicated function with conditional statement
HI,
May be this is what you wanted.
#using tt1
indx<-which(tt1$respons
, let me change the
>conditional statement, I hope you can understand. i will explain by
>example
>
>as you can see, almost every number is duplicated, but only in row 6th,7th,and
>9th the value on column is 1.
>
>on row4th, the value is duplicated( 2 already occurred on 2nd ro
hope you can understand. i will explain by
> example
>
> as you can see, almost every number is duplicated, but only in row
> 6th,7th,and 9th the value on column is 1.
>
> on row4th, the value is duplicated( 2 already occurred on 2nd row),but
> since the value is considered as d
onse is 'buy' than the value on column, on
row4th still zero.
On row 6th, where the value product column is 3. 3 is already occurred
in 3rd row where the value on response is 'buy', so the value on column
should be 1
I hope it can understand the conditional statement.
On Jul 26, 2013, at 2:06 PM, David Winsemius wrote:
>
> On Jul 26, 2013, at 11:51 AM, Uwe Ligges wrote:
>
>>
>>
>> On 25.07.2013 21:05, vanessa van der vaart wrote:
>>> Hi everybody,,
>>> I have a question about R function duplicated(). I have spent days try to
>>> figure this out,but I cant
On Jul 26, 2013, at 11:51 AM, Uwe Ligges wrote:
>
>
> On 25.07.2013 21:05, vanessa van der vaart wrote:
>> Hi everybody,,
>> I have a question about R function duplicated(). I have spent days try to
>> figure this out,but I cant find any solution yet. I hope somebody can help
>> me..
>> this is
On 25.07.2013 21:05, vanessa van der vaart wrote:
Hi everybody,,
I have a question about R function duplicated(). I have spent days try to
figure this out,but I cant find any solution yet. I hope somebody can help
me..
this is my data:
subj=c(1,1,1,2,2,3,3,3,4,4)
response=c('sample','sample','
Hi everybody,,
I have a question about R function duplicated(). I have spent days try to
figure this out,but I cant find any solution yet. I hope somebody can help
me..
this is my data:
subj=c(1,1,1,2,2,3,3,3,4,4)
response=c('sample','sample','buy','sample','buy','sample','
sample','buy','sample',
10 matches
Mail list logo