Importing Vector Graphics
Overview
Functions for converting, importing, and drawing PostScript pictures in R plots.
Install
Health
ERRORre-building of vignette outputsr-release-macos-arm64
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 haltedERRORtestsr-release-macos-arm64
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=u
...[truncated]...
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- ERROR12 OK, 1 ERRORNow
- ERROR13 OK, 1 ERROR2026-03-10
Documentation
- Help pages
- 17
- Examples that run
- no examples
- Exported functions with examples
- 0%
- Documented parameters
- 95%
- Return-value docs
- 60%
- Help pages citing references
- 6%
Downloads
Repository
Repository r-forge.r-project.org/projects/grimport is linked, but repository-practices checks have not run for it yet. Checks are GitHub-only for now.
Dependencies
Installing grImport adds 1 package (1 with compiled code, 937 KB of source tarballs). Heaviest: XML 937 KB.
Code & Tests
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- 0.9-7Latest
- RR 4.2.0 released · 2022-04-22
- 0.9-52021-11-01 · diff ↗
- 0.9-42021-10-11 · diff ↗
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- 0.9-32019-11-27 · diff ↗
- 0.9-22019-05-14 · diff ↗
- RR 3.6.0 released · 2019-04-26
- 0.9-1.12019-01-05 · diff ↗
- 0.9-12018-06-18 · diff ↗
- RR 3.5.0 released · 2018-04-23
Show 47 earlier eventsHide 47 earlier events
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
- RR 3.1.0 released · 2014-04-10
- 0.9-02013-12-11 · diff ↗
- RR 3.0.0 released · 2013-04-03
- RR 2.15.0 released · 2012-03-30
- 0.8-42012-02-15 · diff ↗
- 0.8-32012-01-20 · diff ↗
- 0.8-22012-01-11 · diff ↗
- RR 2.14.0 released · 2011-10-31
- 0.8-12011-09-01 · diff ↗
- 0.8-02011-08-24 · diff ↗
- 0.7-42011-08-04 · diff ↗
- 0.7-32011-06-15 · diff ↗
- RR 2.13.0 released · 2011-04-13
- 0.7-22011-03-28 · diff ↗
- 0.7-1
- RR 2.12.0 released · 2010-10-15
- 0.6-42010-09-20 · diff ↗
- 0.6-32010-08-25 · diff ↗
- 0.6-12010-05-25 · diff ↗
- 0.6
- RR 2.11.0 released · 2010-04-22
- 0.5
- 0.4-52009-11-08 · diff ↗
- RR 2.10.0 released · 2009-10-26
- 0.4-42009-09-18 · diff ↗
- 0.4-32009-04-22 · diff ↗
- RR 2.9.0 released · 2009-04-17
- 0.4-22009-02-23 · diff ↗
- 0.4-12009-01-26 · diff ↗
- 0.42008-11-17 · diff ↗
- RR 2.8.0 released · 2008-10-20
- 0.3-12008-08-01 · diff ↗
- 0.32008-07-28 · diff ↗
- RR 2.7.0 released · 2008-04-22
- RR 2.6.0 released · 2007-10-03
- 0.2-42007-06-20 · diff ↗
- RR 2.5.0 released · 2007-04-24
- 0.2-32007-04-11 · diff ↗
- 0.2-22006-12-15 · diff ↗
- RR 2.4.0 released · 2006-10-03
- 0.2-12006-09-14 · diff ↗
- 0.2
- 0.12006-06-19
- RR 2.3.0 released · 2006-04-24
Package metadata
- First published
- 2006-06-19
- Total releases
- 36 / 20 yrs
- License
- GPL (>= 2) OSI
- Minimum R
- ≥ 3.0.0
- Download size
- 886 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("grImport")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v030.i04.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.