Skip to content

Commit

Permalink
Update PlotFunctions.R
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianAntico committed May 25, 2024
1 parent c71d15d commit 3297b29
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions R/PlotFunctions.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WAfppRRANTY; without even the implied warranty of
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
Expand Down Expand Up @@ -2553,7 +2553,6 @@ Plot.Pie <- function(dt = NULL,
numvars <- c()
byvars <- c()
if(check1) {
if(Debug) print("BarPlot 2.b")
if(!PreAgg) {
if(tryCatch({class(dt[[eval(YVar)]])[1L]}, error = function(x) "bla") %in% c('numeric','integer')) {
numvars <- unique(c(numvars, YVar))
Expand Down Expand Up @@ -2587,18 +2586,11 @@ Plot.Pie <- function(dt = NULL,
temp <- dt[, lapply(.SD, noquote(aggFunc)), .SDcols = c(numvars)]
}
} else {
if(Debug) print("BarPlot 2.bb")
temp <- data.table::copy(dt)
if(Debug) print("BarPlot 2.bbb")
numvars <- ColNameFilter(data = temp, Types = 'numeric')[[1L]]
byvars <- unlist(ColNameFilter(data = temp, Types = "character"))
}

# yvar <- temp[[YVar]]
# xvar <- temp[[XVar]]

if(Debug) print("BarPlot 2.bbbb")

# Transformation
if(YVarTrans != "Identity") {
temp <- AutoTransformationCreate(data = temp, ColumnNames = numvars, Methods = YVarTrans)$Data
Expand Down

0 comments on commit 3297b29

Please sign in to comment.