Skip to content

Commit c888fa9

Browse files
committed
Only run examples in interactive session
1 parent b5609e5 commit c888fa9

26 files changed

+105
-48
lines changed

man/close-GGobi-kz.rd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ variable panel window associated with this ggobi instance.
1818
It also resets the default ggobi instance to be the last
1919
one created.}
2020

21-
\examples{g1 <- ggobi(mtcars)
21+
\examples{
22+
if (interactive()) {
23+
g1 <- ggobi(mtcars)
2224
g2 <- ggobi(mtcars)
2325
close(g2)
24-
close(ggobi_get())}
26+
close(ggobi_get())}}
2527
\keyword{dynamic}

man/close-GGobiDisplay-ke.rd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ Closes the referenced display. The R variable will be invalid after this call.
1414

1515

1616

17-
\examples{g <- ggobi(mtcars)
17+
\examples{
18+
if (interactive()) {
19+
g <- ggobi(mtcars)
1820
displays(g)
1921
close(displays(g)[[1]])
20-
displays(g)}
22+
displays(g)}}
2123
\keyword{internal}

man/colorscheme--b2.rd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Specify the active color scheme in a GGobi instance or the session options.
1414
\value{The name of the previously active color scheme.}
1515
\details{This makes a particular color scheme active within a GGobi instance.}
1616

17-
\examples{g <- ggobi(mtcars)
17+
\examples{
18+
if (interactive()) {
19+
g <- ggobi(mtcars)
1820
colorscheme(g) <- "Set1 8"
19-
colorscheme(g) <- 1}
21+
colorscheme(g) <- 1}}
2022
\keyword{color}

man/colorscheme-6n.rd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ Get name of the active colour scheme
1313

1414

1515

16-
\examples{g <- ggobi(mtcars)
17-
colorscheme(g)}
16+
\examples{
17+
if (interactive()) {
18+
19+
g <- ggobi(mtcars)
20+
colorscheme(g)}}
1821
\keyword{color}

man/dataset-GGobiDisplay-gk.rd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Returns a link to the GGobiData (dataset) object associated with this display.
1414

1515
\details{See \code{\link{[.GGobi}} for more information on}
1616

17-
\examples{g <- ggobi(mtcars)
17+
\examples{
18+
if (interactive()) {
19+
g <- ggobi(mtcars)
1820
d <- displays(g)[[1]]
19-
dataset(d)}
21+
dataset(d)}}
2022
\keyword{manip}

man/dim-GGobiData-ok.rd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ Retrieve the dimension of a GGobiData
1313

1414

1515

16-
\examples{g <- ggobi(mtcars)
17-
dim(g[1])}
16+
\examples{
17+
if (interactive()) {
18+
g <- ggobi(mtcars)
19+
dim(g[1])}}
1820
\keyword{attribute}
1921
\keyword{internal}

man/display-GGobiData-vz.rd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,18 @@ new scatterplot display, change the projection mode to what you want,
2828
and then set the variables. Hopefully this will be improved in a future
2929
version of rggobi.}
3030
\seealso{\code{\link{ggobi_display_types}} for a list of display types}
31-
\examples{g <- ggobi(mtcars)
31+
\examples{
32+
if (interactive()) {
33+
g <- ggobi(mtcars)
3234
display(g[1])
3335
display(g[1], vars=list(X=4, Y=5))
3436
display(g[1], vars=list(X="drat", Y="hp"))
3537
display(g[1], "Parallel Coordinates Display")
38+
}
3639
\dontrun{
3740
display(g[1], "2D Tour")
3841
display(g[1], "2x1D Tour", list(X=c(1,2,3), Y=c(4,5,6)))
39-
}
4042
display(g[1], "Scatterplot Matrix")}
43+
}
44+
4145
\keyword{dynamic}

man/displays-GGobi-n2.rd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ numbered in the order they are created) so you can change
2121
display mode, set variables (\code{\link{variables<-.GGobiDisplay}}),
2222
or save a static image to disk.}
2323
\seealso{\code{\link{display}} to create displays}
24-
\examples{g <- ggobi(mtcars)
24+
\examples{
25+
if (interactive()) {
26+
g <- ggobi(mtcars)
2527
displays(g)
2628
display(g[1])
27-
displays(g)}
29+
displays(g)}}
2830
\keyword{dynamic}

man/edges---GGobiData-qe.rd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ specified by the edge dataset.
2222

2323
To remove edges, set edges to NULL.}
2424
\seealso{\code{\link{ggobi_longitudinal}} for creating edges which simulate time series plots}
25-
\examples{cc<-cor(t(swiss),use="p", method="s")
25+
\examples{
26+
if (interactive()) {
27+
cc<-cor(t(swiss),use="p", method="s")
2628
ccd<-sqrt(2*(1-cc))
2729
a <- which(lower.tri(ccd), arr.ind=TRUE)
2830
src <- row.names(swiss)[a[,2]]
@@ -32,5 +34,5 @@ gg <- ggobi(swiss)
3234
gg$cor <- data.frame(weight)
3335
edges(gg$cor) <- cbind(src, dest)
3436
edges(gg$cor)
35-
edges(gg$cor) <- NULL}
37+
edges(gg$cor) <- NULL}}
3638
\keyword{manip}

man/get--GGobi-7p.rd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@ dataset as if it were a regular R dataset. This function allows one to
2121
get an \code{GGobiData} object that represents a particular
2222
dataset.}
2323

24-
\examples{g <- ggobi(ChickWeight)
24+
\examples{
25+
if (interactive()) {
26+
g <- ggobi(ChickWeight)
2527
g["cars"] <- mtcars
2628
g[1:2]
2729
g["ChickWeight"]
2830
g["cars"]
29-
g$cars}
31+
g$cars}}
3032
\keyword{manip}

0 commit comments

Comments
 (0)