Skip to content

Commit

Permalink
adapt tests/Examples to using lattice::
Browse files Browse the repository at this point in the history
  • Loading branch information
jarioksa committed Jan 22, 2025
1 parent 4e581d7 commit eaa79fc
Showing 1 changed file with 10 additions and 14 deletions.
24 changes: 10 additions & 14 deletions tests/Examples/vegan-Ex.Rout.save
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ Type 'q()' to quit R.
> options(warn = 1)
> library('vegan')
Loading required package: permute
Loading required package: lattice
This is vegan 2.7-0
>
> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
> base::assign(".old_wd", base::getwd(), pos = 'CheckExEnv')
Expand Down Expand Up @@ -811,9 +809,6 @@ Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
> Agropyron <- with(dat, as.numeric(field) + as.numeric(NO3)+2) +rnorm(12)/2
> Schizachyrium <- with(dat, as.numeric(field) - as.numeric(NO3)+2) +rnorm(12)/2
> total <- Agropyron + Schizachyrium
> dotplot(total ~ NO3, dat, jitter.x=TRUE, groups=field,
+ type=c('p','a'), xlab="NO3", auto.key=list(columns=3, lines=TRUE) )
>
> Y <- data.frame(Agropyron, Schizachyrium)
> mod <- metaMDS(Y, trace = FALSE)
> plot(mod)
Expand Down Expand Up @@ -5038,8 +5033,8 @@ Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’
> plot(as.ts(out))
> lag.plot(as.ts(out))
> acf(as.ts(out))
> ## Density plot
> densityplot(permustats(out), as.table = TRUE, layout = c(1,4))
> ## Density plot in lattice graphics
> lattice::densityplot(permustats(out), as.table = TRUE, layout = c(1,4))
> ## Use quantitative null models to compare
> ## mean Bray-Curtis dissimilarities
> data(dune)
Expand Down Expand Up @@ -5850,7 +5845,7 @@ detaching ‘package:mgcv’, ‘package:nlme’
> ## Choose a different scaling
> ordixyplot(ord, scaling = "symmetric")
> ## ... Slices of third axis
> ordixyplot(ord, form = CA1 ~ CA2 | equal.count(CA3, 4),
> ordixyplot(ord, form = CA1 ~ CA2 | lattice::equal.count(CA3, 4),
+ type = c("g","p", "polygon"))
> ## Display environmental variables
> ordixyplot(ord, envfit = envfit(ord ~ Management + A1, dune.env, choices=1:3))
Expand Down Expand Up @@ -6177,8 +6172,9 @@ Model 2.9966 5.3815 1.0184 0.9625 1.6979 0.002 **
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Interval (Upper - Lower) = 0.95)
> densityplot(perm)
> qqmath(perm)
> ## lattice graphics
> lattice::densityplot(perm)
> lattice::qqmath(perm)
> boxplot(perm, scale=TRUE, lty=1, pch=16, cex=0.6, col="hotpink", ylab="SES")
> abline(h=0, col="skyblue")
> ## example of multiple types of statistic
Expand Down Expand Up @@ -6271,10 +6267,10 @@ ungrazed-grazed -0.1219422 -0.2396552 -0.004229243 0.0429502

> plot(mod.HSD)
>
> ## Has permustats() method
> ## lattice graphics with permustats
> pstat <- permustats(pmod)
> densityplot(pstat, scales = list(x = list(relation = "free")))
> qqmath(pstat, scales = list(relation = "free"))
> lattice::densityplot(pstat, scales = list(x = list(relation = "free")))
> lattice::qqmath(pstat, scales = list(relation = "free"))
>
>
>
Expand Down Expand Up @@ -9146,7 +9142,7 @@ Procrustes sum of squares:
> cleanEx()
> options(digits = 7L)
> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
Time elapsed: 8.741 0.323 9.079 0 0
Time elapsed: 8.748 0.349 9.109 0 0
> grDevices::dev.off()
null device
1
Expand Down

0 comments on commit eaa79fc

Please sign in to comment.