diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/R/dataframe_overrides.R b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/R/dataframe_overrides.R deleted file mode 100644 index 2d61513b5326ac326cbce80dd9e4cfdd02fad0f9..0000000000000000000000000000000000000000 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/R/dataframe_overrides.R +++ /dev/null @@ -1,30 +0,0 @@ -# File src/library/base/R/dataframe.R -# Part of the R package, http://www.R-project.org -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# A copy of the GNU General Public License is available at -# http://www.r-project.org/Licenses/ - -# Statlib code by John Chambers, Bell Labs, 1994 -# Changes Copyright (C) 1998-2014 The R Core Team - -Summary.data.frame <- function(..., na.rm=FALSE) -{ - args <- list(...) - args <- lapply(args, function(x) { - x <- as.matrix(x) - if(!is.numeric(x) && !is.complex(x)) - stop("only defined on a data frame with all numeric variables") - x - }) - do.call(.Generic, c(args, na.rm=na.rm)) -} diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/utils/R/packages_overrides.R b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/utils/R/packages_overrides.R deleted file mode 100644 index 0dc6f9fe27335e7b7bd9a53279e914047ccbc833..0000000000000000000000000000000000000000 --- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/utils/R/packages_overrides.R +++ /dev/null @@ -1,56 +0,0 @@ -# File src/library/utils/R/packages.R -# Part of the R package, http://www.R-project.org -# -# Copyright (C) 1995-2014 The R Core Team -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# A copy of the GNU General Public License is available at -# http://www.r-project.org/Licenses/ - -# An override that works around the problems with numeric version generic ops -# We have to eval this re-definition in the utils namespace environmment as it is a private function -# stored in a local map - -eval(expression( -available_packages_filters_db$R_version <- - function(db) -{ - ## Ignore packages which don't fit our version of R. - depends <- db[, "Depends"] - depends[is.na(depends)] <- "" - ## Collect the (versioned) R depends entries. - x <- lapply(strsplit(sub("^[[:space:]]*", "", depends), - "[[:space:]]*,[[:space:]]*"), - function(s) s[grepl("^R[[:space:]]*\\(", s)]) - lens <- sapply(x, length) - pos <- which(lens > 0L) - if(!length(pos)) return(db) - lens <- lens[pos] - ## Unlist. - x <- unlist(x) - pat <- "^R[[:space:]]*\\(([[<>=!]+)[[:space:]]+(.*)\\)[[:space:]]*" - ## Extract ops. - ops <- sub(pat, "\\1", x) - ## Split target versions accordings to ops. - v_t <- split(sub(pat, "\\2", x), ops) - ## Current R version. -# v_c <- getRversion() - v_c <- as.character(getRversion()) - ## Compare current to target grouped by op. - res <- logical(length(x)) - for(op in names(v_t)) - res[ops == op] <- do.call(op, list(v_c, v_t[[op]])) - ## And assemble test results according to the rows of db. - ind <- rep.int(TRUE, NROW(db)) - ind[pos] <- sapply(split(res, rep.int(seq_along(lens), lens)), all) - db[ind, , drop = FALSE] -}), asNamespace("utils"))