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
c2f50ee4
Commit
c2f50ee4
authored
6 years ago
by
Zbyněk Šlajchrt
Browse files
Options
Downloads
Plain Diff
[GR-2798] Missing DL initialization fixed.
PullRequest: fastr/1601
parents
77a310de
62f70061
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/grDevices/R/fastrGridDevices.R
+7
-4
7 additions, 4 deletions
...ruffle/r/library/fastrGrid/grDevices/R/fastrGridDevices.R
with
7 additions
and
4 deletions
com.oracle.truffle.r.library/src/com/oracle/truffle/r/library/fastrGrid/grDevices/R/fastrGridDevices.R
+
7
−
4
View file @
c2f50ee4
...
...
@@ -64,6 +64,9 @@ eval(expression({
if
(
!
missing
(
displaylist
))
{
displaylist
<-
match.arg
(
displaylist
)
grid
::
grid.display.list
(
displaylist
==
"enable"
)
if
(
displaylist
==
"enable"
)
{
.Call
(
grid
:::
C_initDisplayList
)
}
}
else
stop
(
"argument is missing with no default"
)
invisible
()
...
...
@@ -73,12 +76,12 @@ eval(expression({
recordPlot
<-
function
()
{
dl
<-
grid
:::
grid.Call
(
grid
:::
C_getDisplayList
)
dl.idx
<-
grid
:::
grid.Call
(
grid
:::
C_getDLindex
)
# The dummy elements and the class 'recordedplot' make the display list look
# like the GNUR one, which enables its use in the 'evaluate' package
# (used in knitr, for instance).
if
(
all
(
sapply
(
dl
,
function
(
x
)
is.null
(
x
))))
{
if
(
all
(
sapply
(
dl
[
-1
],
function
(
x
)
is.null
(
x
))))
{
pl
<-
list
(
NULL
)
}
else
{
# The dummy elements and the class 'recordedplot' make the display list look
# like the GNUR one, which enables its use in the 'evaluate' package
# (used in knitr, for instance).
pl
<-
list
(
list
(
list
(
"dummyCallX"
,
list
(
list
(
"dummyCallY"
)))),
dl
=
dl
,
dl.idx
=
dl.idx
)
}
class
(
pl
)
<-
"recordedplot"
...
...
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