Giter Site home page Giter Site logo

agridat's People

Contributors

kwstat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agridat's Issues

john.alpha with rows and cols

Hi, since I am using it in teaching and in combination with desplot(), I made the effort to get row and col info for john.alpha from the source. In case you would like to update this to agridat::john.alpha - below is a tribble and here is a link to it as a csv file:
https://raw.githubusercontent.com/SchmidtPaul/DSFAIR/master/data/John%26Williams1995.csv

head(agridat::john.alpha)
#>   plot rep block gen  yield
#> 1    1  R1    B1 G11 4.1172
#> 2    2  R1    B1 G04 4.4461
#> 3    3  R1    B1 G05 5.8757
#> 4    4  R1    B1 G22 4.5784
#> 5    5  R1    B2 G21 4.6540
#> 6    6  R1    B2 G10 4.1736
john.alpha2 <- tibble::tribble(
  ~plot,   ~rep, ~block,  ~gen, ~yield, ~row, ~col,
  1, "R1",       "B1", "G11", 4.1172,    4,    1,
  2, "R1",       "B1", "G04", 4.4461,    3,    1,
  3, "R1",       "B1", "G05", 5.8757,    2,    1,
  4, "R1",       "B1", "G22", 4.5784,    1,    1,
  5, "R1",       "B2", "G21",  4.654,    4,    2,
  6, "R1",       "B2", "G10", 4.1736,    3,    2,
  7, "R1",       "B2", "G20", 4.0141,    2,    2,
  8, "R1",       "B2", "G02",  4.335,    1,    2,
  9, "R1",       "B3", "G23", 4.2323,    4,    3,
  10, "R1",       "B3", "G14", 4.7572,    3,    3,
  11, "R1",       "B3", "G16", 4.4906,    2,    3,
  12, "R1",       "B3", "G18", 3.9737,    1,    3,
  13, "R1",       "B4", "G13",  4.253,    4,    4,
  14, "R1",       "B4", "G03",  3.342,    3,    4,
  15, "R1",       "B4", "G19", 4.7269,    2,    4,
  16, "R1",       "B4", "G08", 4.9989,    1,    4,
  17, "R1",       "B5", "G17", 4.7876,    4,    5,
  18, "R1",       "B5", "G15", 5.0902,    3,    5,
  19, "R1",       "B5", "G07", 4.1505,    2,    5,
  20, "R1",       "B5", "G01", 5.1202,    1,    5,
  21, "R1",       "B6", "G06", 4.7085,    4,    6,
  22, "R1",       "B6", "G12",  5.256,    3,    6,
  23, "R1",       "B6", "G24", 4.9577,    2,    6,
  24, "R1",       "B6", "G09", 3.3986,    1,    6,
  25, "R2",       "B1", "G08", 3.9926,    4,    7,
  26, "R2",       "B1", "G20", 3.6056,    3,    7,
  27, "R2",       "B1", "G14", 4.5294,    2,    7,
  28, "R2",       "B1", "G04", 4.3599,    1,    7,
  29, "R2",       "B2", "G24", 3.9039,    4,    8,
  30, "R2",       "B2", "G15", 4.9114,    3,    8,
  31, "R2",       "B2", "G03", 3.7999,    2,    8,
  32, "R2",       "B2", "G23", 4.3042,    1,    8,
  33, "R2",       "B3", "G12", 5.3127,    4,    9,
  34, "R2",       "B3", "G11", 5.1163,    3,    9,
  35, "R2",       "B3", "G21", 5.3802,    2,    9,
  36, "R2",       "B3", "G17", 5.0744,    1,    9,
  37, "R2",       "B4", "G05", 5.1202,    4,   10,
  38, "R2",       "B4", "G09", 4.2955,    3,   10,
  39, "R2",       "B4", "G10", 4.9057,    2,   10,
  40, "R2",       "B4", "G01", 5.7161,    1,   10,
  41, "R2",       "B5", "G02", 5.1566,    4,   11,
  42, "R2",       "B5", "G18", 5.0988,    3,   11,
  43, "R2",       "B5", "G13",  5.484,    2,   11,
  44, "R2",       "B5", "G22", 5.0969,    1,   11,
  45, "R2",       "B6", "G19", 5.3148,    4,   12,
  46, "R2",       "B6", "G07", 4.6297,    3,   12,
  47, "R2",       "B6", "G06", 5.1751,    2,   12,
  48, "R2",       "B6", "G16", 5.3024,    1,   12,
  49, "R3",       "B1", "G11", 3.9205,    4,   13,
  50, "R3",       "B1", "G01", 4.6512,    3,   13,
  51, "R3",       "B1", "G14", 4.3887,    2,   13,
  52, "R3",       "B1", "G19", 4.5552,    1,   13,
  53, "R3",       "B2", "G02",  4.051,    4,   14,
  54, "R3",       "B2", "G15", 4.6783,    3,   14,
  55, "R3",       "B2", "G09", 3.1407,    2,   14,
  56, "R3",       "B2", "G08", 3.9821,    1,   14,
  57, "R3",       "B3", "G17", 4.3234,    4,   15,
  58, "R3",       "B3", "G18", 4.2486,    3,   15,
  59, "R3",       "B3", "G04",  4.396,    2,   15,
  60, "R3",       "B3", "G06", 4.2474,    1,   15,
  61, "R3",       "B4", "G12", 4.1746,    4,   16,
  62, "R3",       "B4", "G13", 4.7512,    3,   16,
  63, "R3",       "B4", "G10", 4.0875,    2,   16,
  64, "R3",       "B4", "G23", 3.8721,    1,   16,
  65, "R3",       "B5", "G21",  4.413,    4,   17,
  66, "R3",       "B5", "G22", 4.2397,    3,   17,
  67, "R3",       "B5", "G16", 4.3852,    2,   17,
  68, "R3",       "B5", "G24", 3.5655,    1,   17,
  69, "R3",       "B6", "G03", 2.8873,    4,   18,
  70, "R3",       "B6", "G05", 4.1972,    3,   18,
  71, "R3",       "B6", "G20", 3.7349,    2,   18,
  72, "R3",       "B6", "G07", 3.6096,    1,   18
)

desplot::desplot(
  data = john.alpha2,
  flip = TRUE,
  form = gen ~ col + row | rep,
  text = gen,
  cex = 1,
  shorten = "no",
  out1 = rep,
  out2 = block,
  show.key = F
)

Created on 2021-10-21 by the reprex package (v2.0.1)

3D yield response to fertilizers missing example

In the vignette the text states:

The blue dots are observed data, and the tan surface is the fitted surface drawn by the rgl package).

However, there is no associated R code in the RMD file and rgl is not listed in the "Setup" section.

pcaMethods

I find it a bit odd that agridat imports a package (pcaMethods) that is not available from CRAN. I realized this when my students failed to do their homework (analyzing a data example from agridat) because they weren't able to install the package as they didn't figure out that they had to download pcaMethods from Bioconductor. If this import is really necessary, I think it could be helpful to point it out explicitly.

Apart from this, great package! Keep it up!

Philip

Piepho's data

One funny typo: Dactylis glomerata is called cock's foot and not cook's foot. And yes, it's also misspelt in Piepho's original publication.

CRAN check failure

I get this:

checking examples ... ERROR
Running examples in ‘agridat-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: archbold.apple
> ### Title: Split-split plot experiment on apple trees
> ### Aliases: archbold.apple
> ### Keywords: datasets
> 
> ### ** Examples
> 
> dat <- archbold.apple
> 
> # Define main plot and subplot
> dat <- transform(dat, rep=factor(rep), spacing=factor(spacing), trt=factor(trt),
+                  mp = factor(paste(row,spacing,sep="")),
+                  sp = factor(paste(row,spacing,stock,sep="")))
> 
> # Due to 'spacing', the plots are different sizes, but the following layout
> # shows the relative position of the plots and treatments. Note that the
> # 'spacing' treatments are not contiguous in some reps.
> desplot(spacing~row*pos, dat, col=stock, cex=1, num=gen,
+         main="archbold.apple")
> 
> if(require("lme4")){
+ 
+ m1 <- lmer(yield ~ -1 + trt + (1|rep/mp/sp), dat)
+ 
+ require(lucid)
+ vc(m1)  # Variances/means on page 59
+ ##         grp        var1 var2   vcov sdcor
+ ## sp:(mp:rep) (Intercept) <NA>  193.3 13.9
+ ##      mp:rep (Intercept) <NA>  203.8 14.28
+ ##         rep (Intercept) <NA>  197.3 14.05
+ ##    Residual        <NA> <NA> 1015   31.86
+ 
+ }
Loading required package: lme4
Loading required package: Matrix
Loading required package: Rcpp
Loading required package: lucid
Warning in library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE,  :
  there is no package called ‘lucid’
Error: could not find function "vc"
Execution halted

possibly because of

checking package dependencies ... NOTE
Packages suggested but not available for checking:
  ‘agricolae’ ‘equivalence’ ‘FrF2’ ‘gstat’ ‘lucid’ ‘MCMCglmm’ ‘pscl’

But examples should work even without suggested packages.

lsmeans is leaving

Kevin,

I’m writing because your R package agridat still suggests the lsmeans package. For almost a year, the new package emmeans has been available, and I am planning to ask the CRAN team to deprecate it in the next few months. It is quite easy to make the transition to emmeans. There is a vignette providing some tips for how to do this at https://cran.r-project.org/web/packages/emmeans/vignettes/transition-from-lsmeans.html, and there is even a script for converting old R sources, vignettes, and workspaces.

Please let me know if you have any questions. I will keep in touch on this matter as is necessary.

Sincerely,

Russ Lenth

ANOVA table for Alpha lattice design of spring oats, wrong d.f.

anova(m1)
Analysis of Variance Table

Response: yield
Df Sum Sq Mean Sq F value Pr(>F)
gen 24 1458.83 60.785 728.2829 < 2.2e-16 ***
rep 2 6.14 3.068 36.7557 6.593e-09 ***
rep:block 15 3.60 0.240 2.8784 0.006255 **
Residuals 31 2.59 0.083

The degrees of freedom in the anova table for gen is 24 instead of 23, one less than number of levels. The df is wrong.

str(dat)
'data.frame': 72 obs. of 5 variables:
$ plot : int 1 2 3 4 5 6 7 8 9 10 ...
$ rep : Factor w/ 3 levels "R1","R2","R3": 1 1 1 1 1 1 1 1 1 1 ...
$ block: Factor w/ 6 levels "B1","B2","B3",..: 1 1 1 1 2 2 2 2 3 3 ...
** gen : Factor w/ 24 levels **G01","G02","G03",..: 11 4 5 22 21 10 20 2 23 14 ...
$ yield: num 4.12 4.45 5.88 4.58 4.65 ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.