[datatable-help] Thanks for help on := (and another minor correction in help file)

Matthew Dowle mdowle at mdowle.plus.com
Wed Jan 11 22:57:21 CET 2012


On Wed, 2012-01-11 at 14:32 -0500, Steve Lianoglou wrote:
> Hi Joseph,
> 
> On Wed, Jan 11, 2012 at 2:25 PM, Joseph Voelkel <jgvcqa at rit.edu> wrote:
> > I just obtained the latest release of data.table, and immediately went to
> > see what’s new. The help on := was just what I was looking for. It cleared
> > up things nicely for me, the RHS/LHS issue was very helpful, and the
> > examples were the usual good stuff--simple, and they get a variety of ideas
> > across succinctly.
> >
> >
> >
> > Minor note:
> >
> >     DT[a>"A",b:=d*2L]  # subassign to b using d where a>"A"
> >
> > does not work: a is a factor, not character.
> 
> This is on the hit list:
> 
> https://r-forge.r-project.org/tracker/index.php?func=detail&aid=1491&group_id=240&atid=978
> 
> -steve
> 
That seems to be a different FR (:= within group).

I don't know why the warning ('> not meaningful for factors') from the
example wasn't picked up by 'R CMD check', that's odd. Anyway, have
fixed and committed the example, thanks :

> DT
     a b d
[1,] A 4 8
[2,] B 5 9
[3,] C 6 8
> DT[b>4,b:=d*2L]
     a  b d
[1,] A  4 8
[2,] B 18 9
[3,] C 16 8





More information about the datatable-help mailing list