R : Copyright 2005, The R Foundation for Statistical Computing Version 2.1.1 (2005-06-20), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. > ### *
> ### > attach(NULL, name = "CheckExEnv") > assign(".CheckExEnv", as.environment(2), pos = length(search())) # base > ## add some hooks to label plot pages for base and grid graphics > setHook("plot.new", ".newplot.hook") > setHook("persp", ".newplot.hook") > setHook("grid.newpage", ".gridplot.hook") > > assign("cleanEx", + function(env = .GlobalEnv) { + rm(list = ls(envir = env, all.names = TRUE), envir = env) + RNGkind("default", "default") + set.seed(1) + options(warn = 1) + delayedAssign("T", stop("T used instead of TRUE"), + assign.env = .CheckExEnv) + delayedAssign("F", stop("F used instead of FALSE"), + assign.env = .CheckExEnv) + sch <- search() + newitems <- sch[! sch %in% .oldSearch] + for(item in rev(newitems)) + eval(substitute(detach(item), list(item=item))) + missitems <- .oldSearch[! .oldSearch %in% sch] + if(length(missitems)) + warning("items ", paste(missitems, collapse=", "), + " have been removed from the search path") + }, + env = .CheckExEnv) > assign("..nameEx", "__{must remake R-ex/*.R}__", env = .CheckExEnv) # for now > assign("ptime", proc.time(), env = .CheckExEnv) > grDevices::postscript("circular-Examples.ps") > assign("par.postscript", graphics::par(no.readonly = TRUE), env = .CheckExEnv) > options(contrasts = c(unordered = "contr.treatment", ordered = "contr.poly")) > options(warn = 1) > library('circular') Loading required package: boot This is version 0.3-2 of circular package Please report any bugs or comments to claudio@unive.it The package redefine how function 'var' works In particular, (try 'methods(var)') notice that 'var.default' is an alias for the original 'var' function and that a method for data.frame is available. Attaching package: 'circular' The following object(s) are masked from package:stats : var > > assign(".oldSearch", search(), env = .CheckExEnv) > assign(".oldNS", loadedNamespaces(), env = .CheckExEnv) > cleanEx(); ..nameEx <- "A1inv" > > ### * A1inv > > flush(stderr()); flush(stdout()) > > ### Name: A1inv > ### Title: Inverse of A1 > ### Aliases: A1inv > ### Keywords: math > > ### ** Examples > > #Generate data from a von Mises distribution > data <- rvonmises(n=50, mu=pi, kappa=4) > #Estimate the concentration parameter > s <- sum(sin(data)) > c <- sum(cos(data)) > mean.dir <- atan(s, c) > kappa <- A1inv(mean(cos(data - mean.dir))) > > > > cleanEx(); ..nameEx <- "aov.circular" > > ### * aov.circular > > flush(stderr()); flush(stdout()) > > ### Name: aov.circular > ### Title: Analysis of Variance for circular data > ### Aliases: aov.circular print.aov.circular > ### Keywords: models > > ### ** Examples > > > x <- c(rvonmises(50, 0, 1), rvonmises(100, pi/3, 10)) > group <- c(rep(0, 50), rep(1, 100)) > > aov.circular(x, group) Call: aov.circular(x = x, group = group) Circular Analysis of Variance: High Concentration F-Test df SS MS F p Between 1 6.263 6.2632 36.38 1.242e-08 Within 148 29.347 0.1983 NA NA Total 149 35.610 0.2390 NA NA > aov.circular(x, group, method="LRT") Call: aov.circular(x = x, group = group, method = "LRT") Circular Analysis of Variance: Likelihood Ratio Test df: 1 ChiSq: 30.9 p.value: 2.716e-08 > > > > > cleanEx(); ..nameEx <- "axis.circular" > > ### * axis.circular > > flush(stderr()); flush(stdout()) > > ### Name: axis.circular > ### Title: Add Axis to a Circular Plot > ### Aliases: axis.circular > ### Keywords: hplot > > ### ** Examples > > data.vm <- rvonmises(n=100, mu=0, kappa=3) > plot(data.vm, axes=FALSE, ticks=FALSE) > axis.circular(at=seq(0, 11/6*pi, pi/6), labels=c("0", + expression(frac(pi,6)), expression(paste(frac(1,3), pi)), + expression(frac(pi,2)), expression(paste(frac(2,3), pi)), + expression(paste(frac(5,6), pi)), expression(pi), + expression(paste(frac(7,6), pi)), expression(paste(frac(4,3), pi)), + expression(paste(frac(3,2), pi)), expression(paste(frac(5,3), pi)), + expression(paste(frac(11,6), pi)))) > > > > cleanEx(); ..nameEx <- "circular" > > ### * circular > > flush(stderr()); flush(stdout()) > > ### Name: Circular > ### Title: Create Objects of class circular for Circular data. > ### Aliases: circular as.circular is.circular print.circular > ### Keywords: misc > > ### ** Examples > > x <- circular(c(pi, pi/3, pi/4)) > print(x) Circular Data: Type = angles Units = radians Template = none Modulo = asis Zero = 0 Rotation = counter [1] 3.1415927 1.0471976 0.7853982 > is.circular(x) [1] TRUE > > > > cleanEx(); ..nameEx <- "cor.circular" > > ### * cor.circular > > flush(stderr()); flush(stdout()) > > ### Name: cor.circular > ### Title: Correlation Coefficient for Angular Variables > ### Aliases: cor.circular > ### Keywords: univar > > ### ** Examples > > # Generate two circular data sets, and compute their correlation. > x <- rvonmises(n=50, mu=0, kappa=3) > y <- x + rvonmises(n=50, mu=pi, kappa=10) > cor.circular(x, y, test=TRUE) $cor [1] 0.9197672 $statistic [1] 4.764692 $p.value [1] 1.891424e-06 > > > > cleanEx(); ..nameEx <- "density.circular" > > ### * density.circular > > flush(stderr()); flush(stdout()) > > ### Name: density.circular > ### Title: Kernel Density Estimation for Circular Data > ### Aliases: density.circular print.density.circular > ### Keywords: distribution smooth > > ### ** Examples > > x <- rvonmises(n=100, mu=pi, kappa=2) > res25 <- density(x, bw=25) > plot(res25, points.plot=TRUE, xlim=c(-1.5,1)) Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function > res50 <- density(x, bw=25, adjust=2) > lines(res50, col=2) > > > > cleanEx(); ..nameEx <- "equal.kappa.test" > > ### * equal.kappa.test > > flush(stderr()); flush(stdout()) > > ### Name: equal.kappa.test > ### Title: Equal Kappa Test > ### Aliases: equal.kappa.test print.equal.kappa.test > ### Keywords: htest > > ### ** Examples > > > x <- c(rvonmises(50, 0, 1), rvonmises(100, pi/3, 10)) > group <- c(rep(0, 50), rep(1, 100)) > > equal.kappa.test(x, group) Call: equal.kappa.test(x = x, group = group) Test for Homogeneity of Concentration Parameters df: 1 ChiSq: 123.1 p.value: 0 > > > > > cleanEx(); ..nameEx <- "lines.density.circular" > > ### * lines.density.circular > > flush(stderr()); flush(stdout()) > > ### Name: lines.density.circular > ### Title: Add a Plot for Kernel Density Estimation for Circular Data > ### Aliases: lines.density.circular > ### Keywords: dplot > > ### ** Examples > > x <- rvonmises(n=100, mu=pi, kappa=2) > res25 <- density(x, bw=25) > plot(res25, points.plot=TRUE, xlim=c(-1.5,1)) Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function > res50 <- density(x, bw=25, adjust=2) > lines(res50, col=2) > > > > cleanEx(); ..nameEx <- "lm.circular" > > ### * lm.circular > > flush(stderr()); flush(stdout()) > > ### Name: lm.circular > ### Title: Circular-Circular and Circular-Linear Regression > ### Aliases: lm.circular lm.circular.cc lm.circular.cl print.lm.circular.cl > ### Keywords: models regression > > ### ** Examples > > # Generate a data set of dependent circular variables. > x <- circular(runif(50, 0, 2*pi)) > y <- atan(0.15*cos(x) + 0.25*sin(x), 0.35*sin(x)) + rvonmises(n=50, mu=0, + kappa=5) > > # Fit a circular-circular regression model. > circ.lm <- lm.circular(y, x, order=1) > # Obtain a crude plot a data and fitted regression line. > plot.default(x, y) > circ.lm$fitted[circ.lm$fitted>pi] <- circ.lm$fitted[circ.lm$fitted>pi] - 2*pi > > points.default(x[order(x)], circ.lm$fitted[order(x)], type='l') > > > > cleanEx(); ..nameEx <- "lsfit.circle" > > ### * lsfit.circle > > flush(stderr()); flush(stdout()) > > ### Name: lsfit.circle > ### Title: Fit a 2D circle to an (x,y) dataset > ### Aliases: lsfit.circle print.lsfit.circle > ### Keywords: models > > ### ** Examples > > > data(coope) > res <- lsfit.circle(x=x.coope, y=y.coope) > res Call: lsfit.circle(x = x.coope, y = y.coope) r a b Coeff: 4.1059 3.0432 0.7457 Summary in Rectangular Coordinates x y Min. :-1.100 Min. :-3.000 1st Qu.: 0.600 1st Qu.:-1.450 Median : 3.850 Median : 1.300 Mean : 3.388 Mean : 1.087 3rd Qu.: 5.800 3rd Qu.: 4.000 Max. : 7.500 Max. : 4.700 Summary in Polar Coordinates of Recentered Observations angles radius n :8.0000 Min. :3.831 Mean:0.7818 1st Qu.:3.979 Rho :0.1182 Median :4.074 Mean :4.106 3rd Qu.:4.198 Max. :4.491 > > plot(res) > > par(mfcol=c(1,2)) > plot(res$angles) > hist(res$radius) > > windrose(x=res$angles, y=res$radius) > > > > graphics::par(get("par.postscript", env = .CheckExEnv)) > cleanEx(); ..nameEx <- "mean.circular" > > ### * mean.circular > > flush(stderr()); flush(stdout()) > > ### Name: mean.circular > ### Title: Mean Direction > ### Aliases: mean.circular > ### Keywords: univar > > ### ** Examples > > # Compute the mean direction of a random sample of observations. > data <- circular(runif(50, 0, pi)) > mean(data) Circular Data: Type = angles Units = radians Template = none Modulo = asis Zero = 0 Rotation = counter [1] 1.703981 > > > > cleanEx(); ..nameEx <- "mle.vonmises" > > ### * mle.vonmises > > flush(stderr()); flush(stdout()) > > ### Name: mle.vonmises > ### Title: von Mises Maximum Likelihood Estimates > ### Aliases: mle.vonmises print.mle.vonmises > ### Keywords: htest > > ### ** Examples > > x <- rvonmises(n=50, mu=0, kappa=5) > mle.vonmises(x) # estimation of mu and kappa Call: mle.vonmises(x = x) mu: -0.06985 ( 0.06237 ) kappa: 5.668 ( 1.067 ) > mle.vonmises(x, mu=0) # estimation of kappa only Call: mle.vonmises(x = x, mu = 0) mu: 0 ( 0 ) kappa: 5.544 ( 1.041 ) mu is known > > > > cleanEx(); ..nameEx <- "mle.vonmises.bootstrap.ci" > > ### * mle.vonmises.bootstrap.ci > > flush(stderr()); flush(stdout()) > > ### Name: mle.vonmises.bootstrap.ci > ### Title: Bootstrap Confidence Intervals > ### Aliases: mle.vonmises.bootstrap.ci print.mle.vonmises.bootstrap.ci > ### Keywords: htest > > ### ** Examples > > x <- rvonmises(n=25, mu=0, kappa=3) > x.bs <- mle.vonmises.bootstrap.ci(x, alpha=.10) > par(mfcol=c(1,2)) > rose.diag(x.bs$mu, bins=30, main=expression(mu)) > hist(x.bs$kappa, main=expression(kappa)) > > > > graphics::par(get("par.postscript", env = .CheckExEnv)) > cleanEx(); ..nameEx <- "mle.wrappedcauchy" > > ### * mle.wrappedcauchy > > flush(stderr()); flush(stdout()) > > ### Name: mle.wrappedcauchy > ### Title: Wrapped Cauchy Maximum Likelihood Estimates > ### Aliases: mle.wrappedcauchy print.mle.wrappedcauchy > ### Keywords: htest > > ### ** Examples > > x <- rwrappednormal(n=50, mu=0, rho=0.5) > mle.wrappednormal(x) # estimation of mu and rho Call: mle.wrappednormal(x = x) mu: 0.1277 rho: 0.6226 sd: 0.9735 > mle.wrappednormal(x, mu=0) # estimation of rho only Call: mle.wrappednormal(x = x, mu = 0) mu: 0 rho: 0.6193 sd: 0.9789 mu is known > > > > cleanEx(); ..nameEx <- "mle.wrappednormal" > > ### * mle.wrappednormal > > flush(stderr()); flush(stdout()) > > ### Name: mle.wrappednormal > ### Title: Wrapped Normal Maximum Likelihood Estimates > ### Aliases: mle.wrappednormal print.mle.wrappednormal > ### Keywords: htest > > ### ** Examples > > x <- rwrappednormal(n=50, mu=0, rho=0.5) > mle.wrappednormal(x) # estimation of mu and rho (and sd) Call: mle.wrappednormal(x = x) mu: 0.1277 rho: 0.6226 sd: 0.9735 > mle.wrappednormal(x, mu=0) # estimation of rho (and sd) only Call: mle.wrappednormal(x = x, mu = 0) mu: 0 rho: 0.6193 sd: 0.9789 mu is known > > > > cleanEx(); ..nameEx <- "plot.circular" > > ### * plot.circular > > flush(stderr()); flush(stdout()) > > ### Name: plot.circular > ### Title: Circular Data Plot > ### Aliases: plot.circular > ### Keywords: hplot > > ### ** Examples > > # Generate 100 observations from a von Mises distribution. > # with mean direction 0 and concentration 3. > data.vm <- rvonmises(n=100, mu=0, kappa=3) > # Plot data set. All points do not fit on plot. > plot(data.vm, stack=TRUE, bins=150) > # Shrink the plot so that all points fit. > plot(data.vm, stack=TRUE, bins=150, shrink=1.5) > > > > cleanEx(); ..nameEx <- "plot.density.circular" > > ### * plot.density.circular > > flush(stderr()); flush(stdout()) > > ### Name: plot.density.circular > ### Title: Plot Method for Kernel Density Estimation for Circular Data > ### Aliases: plot.density.circular > ### Keywords: dplot > > ### ** Examples > > x <- rvonmises(n=100, mu=pi, kappa=2) > res25 <- density(x, bw=25) > plot(res25, points.plot=TRUE, xlim=c(-1.5,1)) Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function Warning: parameter "points.plot" could not be set in high-level plot() function > res50 <- density(x, bw=25, adjust=2) > lines(res50, col=2) > > > > cleanEx(); ..nameEx <- "plot.edf" > > ### * plot.edf > > flush(stderr()); flush(stdout()) > > ### Name: plot.edf > ### Title: Plot Circular Empirical Distribution Function > ### Aliases: plot.edf lines.edf > ### Keywords: hplot > > ### ** Examples > > # Compare the edf's of two simulated sets of data. > data1 <- rvonmises(n=10, mu=0, kappa=3) > data2 <- rvonmises(n=10, mu=0, kappa=1) > plot.edf(data1, xlab="Data", ylab="EDF", main="Plots of Two EDF's") > lines.edf(data2, lty=2, col=2) > > > > cleanEx(); ..nameEx <- "plot.lsfit.circle" > > ### * plot.lsfit.circle > > flush(stderr()); flush(stdout()) > > ### Name: plot.lsfit.circle > ### Title: Plot method for lsfit.circle function > ### Aliases: plot.lsfit.circle > ### Keywords: hplot > > ### ** Examples > > > data(coope) > res <- lsfit.circle(x=x.coope, y=y.coope) > plot(res) > > > > cleanEx(); ..nameEx <- "points.circular" > > ### * points.circular > > flush(stderr()); flush(stdout()) > > ### Name: points.circular > ### Title: Add Points to a Circular Plot > ### Aliases: points.circular > ### Keywords: hplot > > ### ** Examples > > data.1 <- rvonmises(n=100, mu=0, kappa=3) > data.2 <- rvonmises(n=100, mu=pi/3, kappa=3) > res <- plot(data.1, stack=FALSE, bins=150, shrink=1.5, col=1) > points(data.2, plot.info=res, col=2) > > > > cleanEx(); ..nameEx <- "pp.plot" > > ### * pp.plot > > flush(stderr()); flush(stdout()) > > ### Name: pp.plot > ### Title: von Mises Probability-Probability Plot > ### Aliases: pp.plot > ### Keywords: hplot > > ### ** Examples > > x <- rvonmises(n=25, mu=0, kappa=3) > pp.plot(x) > x <- c(rvonmises(n=20, mu=0, kappa=7), rvonmises(n=20, mu=pi, kappa=7)) > pp.plot(x) > > > > cleanEx(); ..nameEx <- "range.circular" > > ### * range.circular > > flush(stderr()); flush(stdout()) > > ### Name: range.circular > ### Title: Circular Range > ### Aliases: range.circular > ### Keywords: univar htest > > ### ** Examples > > data <- rvonmises(n=50, mu=0, kappa=2) > range(data, test=TRUE) $range [1] 4.231505 $p.value [1] 1.933770e-07 > data <- circular(runif(50, 0, 2*pi)) > range(data, test=TRUE) $range [1] 5.411513 $p.value [1] 0.03302356 > > > > cleanEx(); ..nameEx <- "rayleigh.test" > > ### * rayleigh.test > > flush(stderr()); flush(stdout()) > > ### Name: rayleigh.test > ### Title: Rayleigh Test of Uniformity > ### Aliases: rayleigh.test print.rayleigh.test > ### Keywords: htest > > ### ** Examples > > x <- rvonmises(n=25, mu=pi, kappa=2) > # General alternative > rayleigh.test(x) Rayleigh Test of Uniformity General Unimodal Alternative Test Statistic: 0.6967 P-value: 0 > # Specified alternative > rayleigh.test(x, mu=0) Rayleigh Test of Uniformity Alternative with Specified Mean Direction: 0 Test Statistic: -0.6966 P-value: 1 > > > > cleanEx(); ..nameEx <- "rho.circular" > > ### * rho.circular > > flush(stderr()); flush(stdout()) > > ### Name: rho.circular > ### Title: Mean Resultant Length > ### Aliases: rho.circular > ### Keywords: univar > > ### ** Examples > > # Compute the mean resultant length of a random sample of observations. > data <- circular(runif(100, 0, 2*pi)) > rho.circular(data) [1] 0.09539008 > > > > cleanEx(); ..nameEx <- "rose.diag" > > ### * rose.diag > > flush(stderr()); flush(stdout()) > > ### Name: rose.diag > ### Title: Rose Diagram > ### Aliases: rose.diag > ### Keywords: hplot > > ### ** Examples > > # Generate uniform data and create several rose diagrams. > # Some optional parameters may be needed to optimize plots. > x <- circular(runif(50, 0, 2*pi)) > rose.diag(x, bins = 18, main = 'Uniform Data') > points(x) > # Generate von Mises data and create several rose diagrams. > x <- rvonmises(n=25, mu=0, kappa=5, zero=pi/4) > y <- rose.diag(x, bins=18) # Points fall out of bounds. > points(x, plot.info=y, stack=TRUE) > y <- rose.diag(x, bins=36, prop=1.5, shrink=1.5) # Adjust optional parameters to fit all points on plot. > points(x, plot.info=y, stack=TRUE) > > > > cleanEx(); ..nameEx <- "rstable" > > ### * rstable > > flush(stderr()); flush(stdout()) > > ### Name: rstable > ### Title: Random Generation from the Stable Family of Distributions > ### Aliases: rstable > ### Keywords: distribution > > ### ** Examples > > hist(rstable(200, 1.5, .5)) #fairly long tails, skewed right > > > > cleanEx(); ..nameEx <- "summary.circular" > > ### * summary.circular > > flush(stderr()); flush(stdout()) > > ### Name: summary.circular > ### Title: Circular Summary Statistics > ### Aliases: summary.circular > ### Keywords: univar > > ### ** Examples > > # Compute summary statistics of a random sample of observations. > data <- circular(runif(50, 0, pi)) > summary(data) n Mean Rho 50.0000000 1.7039815 0.6815599 > summary(data.frame(data, runif(50, 0, pi))) data runif.50..0..pi. n :50.0000 Min. :0.1851 Mean: 1.7040 1st Qu.:1.0007 Rho : 0.6816 Median :1.4362 Mean :1.5805 3rd Qu.:2.4002 Max. :3.0179 > > > > cleanEx(); ..nameEx <- "var.circular" > > ### * var.circular > > flush(stderr()); flush(stdout()) > > ### Name: var.circular > ### Title: A measure of variance for Circular Data > ### Aliases: var.circular > ### Keywords: univar > > ### ** Examples > > # Compute the mean resultant length of a random sample of observations. > x <- rvonmises(n=100, mu=0, kappa=1) > var(x) [1] 0.4771242 > > > > cleanEx(); ..nameEx <- "watson.test" > > ### * watson.test > > flush(stderr()); flush(stdout()) > > ### Name: watson.test > ### Title: Watson's Test > ### Aliases: watson.test print.watson.test > ### Keywords: htest > > ### ** Examples > > # Generate data from the uniform distribution on the circle. > x <- circular(runif(100, 0, 2*pi)) > watson.test(x) Watson's Test for Circular Uniformity Test Statistic: 0.0903 P-value > 0.10 > # Generate data from a von Mises distribution. > x <- rvonmises(n=50, mu=0, kappa=4) > watson.test(x, alpha=0.05, dist="vonmises") Watson's Test for the von Mises Distribution Test Statistic: 0.0476 Level 0.05 Critical Value: 0.117 Do Not Reject Null Hypothesis > > > > cleanEx(); ..nameEx <- "watson.two.test" > > ### * watson.two.test > > flush(stderr()); flush(stdout()) > > ### Name: watson.two.test > ### Title: Watson's Two-Sample Test of Homogeneity > ### Aliases: watson.two.test print.watson.two.test > ### Keywords: htest > > ### ** Examples > > # Perform a two-sample test of homogeneity on two > # simulated data sets. > data1 <- rvonmises(n=20, mu=0, kappa=3) > data2 <- rvonmises(n=20, mu=pi, kappa=2) > watson.two.test(data1, data2, alpha=0.05) Watson's Two-Sample Test of Homogeneity Test Statistic: 0.8149 Level 0.05 Critical Value: 0.187 Reject Null Hypothesis > watson.two.test(data1, data2) Watson's Two-Sample Test of Homogeneity Test Statistic: 0.8149 P-value < 0.001 > > > > cleanEx(); ..nameEx <- "windrose" > > ### * windrose > > flush(stderr()); flush(stdout()) > > ### Name: windrose > ### Title: Windrose Generator > ### Aliases: windrose > ### Keywords: hplot > > ### ** Examples > > # Random distribution of direction and magnitude in degrees > > dir <- circular(runif(100, 0, 360), units="degrees") > mag <- rgamma(100, 15) > sample <- data.frame(dir=dir, mag=mag) > > par(mfrow=c(2,2)) > res <- windrose(sample) > ## we join two pedals and keep the same shrink (scale of the plot) > breaks <- seq(0, 2 * pi, by = pi/6) > breaks <- breaks[-2] > windrose(sample, breaks=breaks, main="The same but with two pedals joined", shrink=res$shrink) > ## change the rotation > sample <- data.frame(dir=circular(dir, units="degrees", rotation="clock"), mag=mag) > windrose(sample, breaks=breaks, main="Change the rotation", shrink=res$shrink) > ## use geographics template > sample <- data.frame(dir=circular(dir, units="degrees", template="geographics"), mag=mag) > windrose(sample, breaks=breaks, main="Use the template 'geographics'", shrink=res$shrink) > > ## do the same plot but in radians > dir <- conversion.circular(dir) > windrose(x=dir, y=mag, xlim=c(-1.3, 1.3)) > > ## magnify some part of the plot > windrose(x=dir, y=mag, xlim=c(0, 1.3)) > > > > graphics::par(get("par.postscript", env = .CheckExEnv)) > ### *