Skip to content

Commit

Permalink
Revert "stats::aggregate now renamed argument formula to x (#33)"
Browse files Browse the repository at this point in the history
This reverts commit 4aa01d0.
  • Loading branch information
shihabdider authored Nov 8, 2023
1 parent 4aa01d0 commit d1a67d1
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions R/gTrack.R
Original file line number Diff line number Diff line change
Expand Up @@ -3151,8 +3151,8 @@ draw.grl = function(grl,
{
if (is.null(y) | !is.null(ylim.subplot))
{
pos1 = aggregate(x = pos1 ~ group, data = grl.segs, FUN = min);
pos2 = aggregate(x = pos2 ~ group, data = grl.segs, FUN = max);
pos1 = aggregate(formula = pos1 ~ group, data = grl.segs, FUN = min);
pos2 = aggregate(formula = pos2 ~ group, data = grl.segs, FUN = max);
pos1 = structure(pos1[,2], names = pos1[,1]) - round(stack.gap/2);
pos2 = structure(pos2[,2]-1, names = pos2[,1]) + round(stack.gap/2);

Expand Down Expand Up @@ -3235,10 +3235,10 @@ draw.grl = function(grl,
}))

contig.lim = data.frame(
group = names(vaggregate(x = y.relbin ~ group, data = grl.segs, FUN = max)),
pos1 = vaggregate(x = pos1 ~ group, data = grl.segs, FUN = min) - round(stack.gap)/2,
pos2 = vaggregate(x = pos2 ~ group, data = grl.segs, FUN = max) + round(stack.gap)/2,
height = vaggregate(x = y.relbin ~ group, data = grl.segs, FUN = max)
group = names(vaggregate(formula = y.relbin ~ group, data = grl.segs, FUN = max)),
pos1 = vaggregate(formula = pos1 ~ group, data = grl.segs, FUN = min) - round(stack.gap)/2,
pos2 = vaggregate(formula = pos2 ~ group, data = grl.segs, FUN = max) + round(stack.gap)/2,
height = vaggregate(formula = y.relbin ~ group, data = grl.segs, FUN = max)
);
contig.lim$width = contig.lim$pos2 - contig.lim$pos1
contig.lim$y.bin = 0;
Expand Down Expand Up @@ -3962,10 +3962,10 @@ draw.grl = function(grl,
{
if (!draw.paths)
{
pos1 = vaggregate(x = pos1 ~ group, data = grl.segs, FUN = min);
pos2 = vaggregate(x = pos2 ~ group, data = grl.segs, FUN = max);
ywid = vaggregate(x = ywid ~ group, data = grl.segs, FUN = max);
y = vaggregate(x = y ~ group, data = grl.segs, FUN = mean);
pos1 = vaggregate(formula = pos1 ~ group, data = grl.segs, FUN = min);
pos2 = vaggregate(formula = pos2 ~ group, data = grl.segs, FUN = max);
ywid = vaggregate(formula = ywid ~ group, data = grl.segs, FUN = max);
y = vaggregate(formula = y ~ group, data = grl.segs, FUN = mean);
grl.segs.u = data.frame(group = names(pos1), pos1, pos2, y, ywid);
grl.segs.u$grl.labels = grl.props$grl.labels[match(grl.segs.u$group, grl.props$group)]
grl.segs.u$grl.cols = grl.props$grl.cols[match(grl.segs.u$group, grl.props$group)]
Expand All @@ -3984,10 +3984,10 @@ draw.grl = function(grl,
}
else
{
pos1 = vaggregate(x = pos1 ~ group, data = grl.segs, FUN = min);
pos2 = vaggregate(x = pos2 ~ group, data = grl.segs, FUN = max);
y0 = vaggregate(x = y ~ group, data = grl.segs, FUN = min);
y1 = vaggregate(x = y ~ group, data = grl.segs, FUN = max);
pos1 = vaggregate(formula = pos1 ~ group, data = grl.segs, FUN = min);
pos2 = vaggregate(formula = pos2 ~ group, data = grl.segs, FUN = max);
y0 = vaggregate(formula = y ~ group, data = grl.segs, FUN = min);
y1 = vaggregate(formula = y ~ group, data = grl.segs, FUN = max);
grl.segs.u = data.frame(group = names(pos1), pos1, pos2, y0, y1);
grl.segs.u$grl.labels = grl.props$grl.labels[match(grl.segs.u$group, grl.props$group)]
grl.segs.u$grl.cols = grl.props$grl.cols[match(grl.segs.u$group, grl.props$group)]
Expand Down

0 comments on commit d1a67d1

Please sign in to comment.