Skip to content

grImport

Importing Vector Graphics

v0.9-7 · Mar 9, 2023 · GPL (>= 2)

Description

Functions for converting, importing, and drawing PostScript pictures in R plots.

Downloads

2.1K

Last 30 days

2752nd

2.1K

Last 90 days

2.1K

Last year

CRAN Check Status

1 ERROR
13 OK
Show all 14 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-macos-arm64 ERROR
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK
Check details (15 non-OK)
OK r-devel-linux-x86_64-debian-clang

*


            
OK r-devel-linux-x86_64-debian-gcc

*


            
OK r-devel-linux-x86_64-fedora-clang

*


            
OK r-devel-linux-x86_64-fedora-gcc

*


            
ERROR r-devel-macos-arm64

re-building of vignette outputs

Error(s) in re-building vignettes:
--- re-building ‘import.Rnw’ using Sweave
Loading required package: XML
sh: gs: command not found
Warning in system(paste(shQuote(gsexe), "-help > /dev/null")) :
  error in running command

Error: processing vignette 'import.Rnw' failed with diagnostics:
 chunk 5 (label = chesspiece) 
Error in PostScriptTrace("chess_game_01.fromInkscape.eps") : 
  sorry, 'gs' cannot be found

--- failed re-building 'import.Rnw'

--- re-building ‘importText.Rnw’ using Sweave
Loading required package: XML
sh: gs: command not found
Warning in system(paste(shQuote(gsexe), "-help > /dev/null")) :
  error in running command

Error: processing vignette 'importText.Rnw' failed with diagnostics:
 chunk 4 (label = simpleimport) 
Error in PostScriptTrace("hello.ps", "hello.xml") : 
  sorry, 'gs' cannot be found

--- failed re-building 'importText.Rnw'

SUMMARY: processing the following files failed:
  ‘import.Rnw’ ‘importText.Rnw’

Error: Vignette re-building failed.
Execution halted
ERROR r-devel-macos-arm64

tests

  Running ‘testpage.R’ [0s/0s]
Running the tests in ‘tests/testpage.R’ failed.
Complete output:
  > #######################################
  > # Produce testpage.ps from R 
  > #######################################
  > 
  > require(grid)
  Loading required package: grid
  > 
  > # A star polygon which is filled differently
  > # by non-zero winding rule and even-odd fill
  > star <- function(lab, gp=gpar(fill="black", lwd=1)) {
  +     grid.text(lab, y=unit(1, "npc"), just="bottom")
  +     pushViewport(viewport(xscale=c(-1, 1),
  +                           yscale=c(-1, 1)))
  +     t <- seq(0, 2*pi, length=6)[-6]
  +     x <- cos(t)
  +     y <- sin(t)
  +     grid.polygon(x[c(1, 4, 2, 5, 3)],
  +                  y[c(1, 4, 2, 5, 3)],
  +                  default="native",
  +                  gp=gp)
  +     popViewport()
  + }
  > 
  > postscript("testpage.ps", horiz=FALSE)
  > # grid.newpage()
  > pushViewport(viewport(layout=grid.layout(6, 5,
  +                         heights=unit(c(1, 1), c("lines", "null")),
  +                         respect=TRUE)))
  > pushViewport(viewport(layout.pos.row=2,
  +                       layout.pos.col=1))
  > star("eofill")
  > popViewport()
  > pushViewport(viewport(layout.pos.row=2,
  +                       layout.pos.col=2))
  > star("fill")
  > popViewport()
  > pushViewport(viewport(layout.pos.row=2,
  +                       layout.pos.col=3))
  > star("stroke", gp=gpar(fill=NA))
  > popViewport()
  > pushViewport(viewport(layout.pos.row=2,
  +                       layout.pos.col=4))
  > star("colour", gp=gpar(fill="light blue"))
  > popViewport()
  > pushViewport(viewport(layout.pos.row=2,
  +                       layout.pos.col=5))
  > star("lwd", gp=gpar(lwd=3))
  > dev.off()
  null device 
            1 
  > 
  > 
  > # Modify the PostScript file to insert eofill def and
  > # change one of the fills to eofill
  > testpageps <- readLines("testpage.ps")
  > p3line <- grep("^/p3", testpageps)
  > testpageps[p3line] <-
  +     paste(testpageps[p3line],
  +           "\n/p4 { gsave bg eofill grestore stroke } def")
  > fillline <- grep(" p3$", testpageps)
  > testpageps[fillline[1]] <- gsub(" p3$", " p4", testpageps[fillline[1]])
  > writeLines(testpageps, "testpage.ps")
  >           
  > 
  > 
  > #######################################
  > # Now import testpage.ps and draw it in various ways
  > #######################################
  > 
  > require(grImport)
  Loading required package: grImport
  Loading required package: XML
  > 
  > PostScriptTrace("testpage.ps", "testpage.xml")
  sh: gs: command not found
  Error in PostScriptTrace("testpage.ps", "testpage.xml") : 
    sorry, 'gs' cannot be found
  In addition: Warning message:
  In system(paste(shQuote(gsexe), "-help > /dev/null")) :
    error in running command
  Execution halted
OK r-devel-windows-x86_64

*


            
OK r-oldrel-macos-arm64

*


            
OK r-oldrel-macos-x86_64

*


            
OK r-oldrel-windows-x86_64

*


            
OK r-patched-linux-x86_64

*


            
OK r-release-linux-x86_64

*


            
OK r-release-macos-arm64

*


            
OK r-release-macos-x86_64

*


            
OK r-release-windows-x86_64

*


            

Check History

ERROR 13 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Mar 9, 2026
ERROR r-devel-macos-arm64

tests

  Running ‘testpage.R’ [0s/0s]
Running the tests in ‘tests/testpage.R’ failed.
Complete output:
  > #######################################
  > # Produce testpage.ps from R 
  > #######################################
  > 
  > require(grid)
  Loading required package: grid
  > 
  > # A star polygon which is filled differently
  > # by non-zero winding rule and even-odd fill
  > star <- function(lab, gp=gpar(fill="black", lwd=1)) {
  +     grid.text(lab, y=unit(1, "npc"), just="bottom")
  +     p

Reverse Dependencies (5)

Dependency Network

Dependencies Reverse dependencies XML RGraphics ontophylo gdiff metapost spiralize grImport

Version History

new 0.9-7 Mar 9, 2026