Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
QueryR
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Lopez
QueryR
Commits
5892260c
Commit
5892260c
authored
7 years ago
by
Florian Angerer
Browse files
Options
Downloads
Patches
Plain Diff
Load package 'methods' in GnuR Rscript sessions and do not ignore
recommended packages for GnuR.
parent
84b82282
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
com.oracle.truffle.r.test.packages/r/install.cache.R
+5
-1
5 additions, 1 deletion
com.oracle.truffle.r.test.packages/r/install.cache.R
com.oracle.truffle.r.test.packages/r/install.packages.R
+8
-2
8 additions, 2 deletions
com.oracle.truffle.r.test.packages/r/install.packages.R
with
13 additions
and
3 deletions
com.oracle.truffle.r.test.packages/r/install.cache.R
+
5
−
1
View file @
5892260c
...
...
@@ -21,6 +21,10 @@
# questions.
#
is.fastr
<-
function
()
{
length
(
grep
(
'FastR'
,
R.Version
()
$
version.string
))
}
# A simple log function; to be replaced by a user of this file.
log.message
<-
function
(
...
,
level
=
0
)
{
cat
(
...
,
"\n"
)
...
...
@@ -255,7 +259,7 @@ recommended.base.packages <- c("boot", "class", "cluster", "codetools", "foreign
base.packages
<-
c
(
"base"
,
"compiler"
,
"datasets"
,
"grDevices"
,
"graphics"
,
"grid"
,
"methods"
,
"parallel"
,
"splines"
,
"stats"
,
"stats4"
,
"tools"
,
"utils"
)
# the list of packages that will be excluded in the transitive dependecies
ignored.packages
<-
recommended.base.packages
ignored.packages
<-
if
(
is.fastr
())
recommended.base.packages
else
base.packages
package.dependencies
<-
function
(
pkg
,
lib
,
dependencies
=
c
(
"Depends"
,
"Imports"
,
"LinkingTo"
),
pl
=
available.packages
())
{
if
(
!
(
pkg
%in%
rownames
(
pl
)))
{
...
...
This diff is collapsed.
Click to expand it.
com.oracle.truffle.r.test.packages/r/install.packages.R
+
8
−
2
View file @
5892260c
...
...
@@ -135,6 +135,8 @@ trim <- function (x) gsub("^\\s+|\\s+$", "", x)
strip.version
<-
function
(
x
)
gsub
(
"\\s*\\(.*\\)$"
,
""
,
x
)
initial.packages
<-
c
(
"methods"
,
"datasets"
,
"utils"
,
"grDevices"
,
"graphics"
,
"stats"
)
default.packages
<-
c
(
"R"
,
"base"
,
"grid"
,
"splines"
,
"utils"
,
"compiler"
,
"grDevices"
,
"methods"
,
"stats"
,
"stats4"
,
"datasets"
,
"graphics"
,
"parallel"
,
"tools"
,
"tcltk"
)
...
...
@@ -857,12 +859,16 @@ is.fastr <- function() {
system.test
<-
function
(
pkgname
)
{
script
<-
normalizePath
(
"com.oracle.truffle.r.test.packages/r/test.package.R"
)
options
<-
character
(
0
)
if
(
is.fastr
())
{
rscript
=
file.path
(
R.home
(),
"bin"
,
"Rscript"
)
}
else
{
rscript
=
gnu_rscript
()
# GnuR's Rscript command does not load the 'methods' package by default.
# But the examples are assumed to be run in a shell where the package is on the search path.
options
<-
paste0
(
"--default-packages="
,
paste0
(
initial.packages
,
collapse
=
","
))
rscript
=
gnu_rscript
()
}
args
<-
c
(
script
,
pkgname
,
file.path
(
testdir
,
pkgname
),
lib.install
)
args
<-
c
(
options
,
script
,
pkgname
,
file.path
(
testdir
,
pkgname
),
lib.install
)
# we want to stop tests that hang, but some packages have many tests
# each of which spawns a sub-process (over which we have no control)
# so we time out the entire set after 20 minutes.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment