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 authored and krlmlr committed Nov 6, 2024
1 parent a9bfa59 commit e8a5627
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 @@ -362,7 +362,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 e8a5627

Please sign in to comment.