labeling-Ex.Rout (2181B)
1 2 R version 3.6.3 (2020-02-29) -- "Holding the Windsock" 3 Copyright (C) 2020 The R Foundation for Statistical Computing 4 Platform: x86_64-pc-linux-gnu (64-bit) 5 6 R is free software and comes with ABSOLUTELY NO WARRANTY. 7 You are welcome to redistribute it under certain conditions. 8 Type 'license()' or 'licence()' for distribution details. 9 10 Natural language support but running in an English locale 11 12 R is a collaborative project with many contributors. 13 Type 'contributors()' for more information and 14 'citation()' on how to cite R or R packages in publications. 15 16 Type 'demo()' for some demos, 'help()' for on-line help, or 17 'help.start()' for an HTML browser interface to help. 18 Type 'q()' to quit R. 19 20 > pkgname <- "labeling" 21 > source(file.path(R.home("share"), "R", "examples-header.R")) 22 > options(warn = 1) 23 > library('labeling') 24 > 25 > base::assign(".oldSearch", base::search(), pos = 'CheckExEnv') 26 > base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv') 27 > cleanEx() 28 > nameEx("labeling-package") 29 > ### * labeling-package 30 > 31 > flush(stderr()); flush(stdout()) 32 > 33 > ### Name: labeling-package 34 > ### Title: Axis labeling 35 > ### Aliases: labeling labeling-package 36 > ### Keywords: dplot 37 > 38 > ### ** Examples 39 > 40 > heckbert(8.1, 14.1, 4) # 5 10 15 41 [1] 5 10 15 42 > wilkinson(8.1, 14.1, 4) # 8 9 10 11 12 13 14 15 43 [1] 8 9 10 11 12 13 14 15 44 > extended(8.1, 14.1, 4) # 8 10 12 14 45 [1] 8 10 12 14 46 > # When plotting, extend the plot range to include the labeling 47 > # Should probably have a helper function to make this easier 48 > data(iris) 49 > x <- iris$Sepal.Width 50 > y <- iris$Sepal.Length 51 > xl <- extended(min(x), max(x), 6) 52 > yl <- extended(min(y), max(y), 6) 53 > plot(x, y, 54 + xlim=c(min(x,xl),max(x,xl)), 55 + ylim=c(min(y,yl),max(y,yl)), 56 + axes=FALSE, main="Extended labeling") 57 > axis(1, at=xl) 58 > axis(2, at=yl) 59 > 60 > 61 > 62 > ### * <FOOTER> 63 > ### 64 > cleanEx() 65 > options(digits = 7L) 66 > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") 67 Time elapsed: 0.07 0 0.07 0 0 68 > grDevices::dev.off() 69 null device 70 1 71 > ### 72 > ### Local variables: *** 73 > ### mode: outline-minor *** 74 > ### outline-regexp: "\\(> \\)?### [*]+" *** 75 > ### End: *** 76 > quit('no')