Skip to content

Commit

Permalink
use only the first class of column
Browse files Browse the repository at this point in the history
  • Loading branch information
toppyy committed Nov 3, 2024
1 parent 3bd3b70 commit 9c74416
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/translate.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ rel_find_call <- function(fun, env) {

infer_class_of_expr <- function(expr, names_data, classes_data) {
if (typeof(expr) == "symbol" && as.character(expr) %in% names_data) {
return(classes_data[which(as.character(expr) == names_data)][[1]])
return(classes_data[which(as.character(expr) == names_data)])
}
return(class(expr)[[1]])
}
Expand Down Expand Up @@ -358,7 +358,7 @@ rel_translate <- function(

classes_data <- NULL
if (!missing(data) && !is.null(data)) {
classes_data <- map(data, class)
classes_data <- unlist(map(data,function(col) class(col)[[1]]))
}


Expand Down

0 comments on commit 9c74416

Please sign in to comment.