Skip to content

Commit 19d1c5f

Browse files
committed
fixed generating of column names in as.data.frame.polyglot.value
1 parent 38868ab commit 19d1c5f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/R/polyglot.value_overrides.R

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,5 @@ as.array.polyglot.value <- function(x, ...) {
3232
as.data.frame.polyglot.value <- function(x, row.names = NULL, optional = FALSE, ..., nm = paste(deparse(substitute(x),
3333
width.cutoff = 500L), collapse = " ")) {
3434
v <- .fastr.interop.asVector(x, recursive=TRUE, dropDimensions=FALSE)
35-
if (!optional && !is.null(v) && is.atomic(v)) {
36-
v <- list(v)
37-
names(v) <- nm
38-
}
39-
as.data.frame(v, row.names=row.names, optional=optional, ...)
35+
as.data.frame(v, row.names=row.names, optional=optional, nm=nm, ...)
4036
}

0 commit comments

Comments
 (0)