Skip to content

Commit

Permalink
test google auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio Lozano Isla committed May 16, 2024
1 parent fdebabf commit 6b4fcd2
Show file tree
Hide file tree
Showing 14 changed files with 59 additions and 14 deletions.
7 changes: 4 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Package: inti
Type: Package
Version: 0.6.4
Version: 0.6.5
Title: Tools and Statistical Procedures in Plant Science
Description: The 'inti' package is part of the 'inkaverse' project for developing
different procedures and tools used in plant science and experimental designs.
The mean aim of the package is to support researchers during the planning of
experiments and data collection (tarpuy()), data analysis and graphics (yupana())
, and technical writing.
Learn more about the 'inkaverse' project at <https://inkaverse.com/>.
Date: 2024-02-05
Date: 2024-05-15
Authors@R: c(
person("Flavio", "Lozano-Isla", email = "flozanoisla@gmail.com", role = c("aut", "cre")
, comment = c(ORCID = "0000-0002-0714-669X")),
Expand All @@ -31,7 +31,8 @@ Imports:
emmeans,
purrr,
stringr,
stringi,
stringi,
googlesheets4,
DT
Suggests:
gsheet,
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

# inti 0.6.5

- Package
- Include Addins for Google authentication and renew process

- Rticles
- Fix title position in article
- Fix figure caption and cross reference
Expand Down
15 changes: 15 additions & 0 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,18 @@ utils::globalVariables(c(".", ":=", "%>%"))
#' @export
dplyr::`%>%`


GoogleAuth <- function() {

googlesheets4::gs4_auth(email = TRUE)

}


RenewAuth <- function() {

googlesheets4::gs4_token()

}


9 changes: 9 additions & 0 deletions inst/rstudio/addins.dcf
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ Description: Field experimental designs.
Binding: tarpuy
Interactive: true

Name: Google Authentication
Description: Google authentication process.
Binding: GoogleAuth
Interactive: false

Name: Renew Authentication
Description: Renew Google authentication user.
Binding: RenewAuth
Interactive: false
Binary file modified vignettes/extra/files/fig-01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/extra/files/fig-02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/extra/files/fig-03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/extra/files/plot_cluster_map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/extra/files/plot_pca_ind.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified vignettes/extra/files/plot_pca_var.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion vignettes/extra/yupana-coding.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@
title: "Yupana: coding workflow"
description: 'Reproduce results from Yupana coding'
author: "Flavio Lozano-Isla"
output: rmarkdown::html_vignette
output:
bookdown::pdf_book:
keep_tex: true
bookdown::html_document2:
base_format: rmarkdown::html_vignette
toc: true
number_sections: false
pkgdown:
as_is: true
vignette: >
%\VignetteEncoding{UTF-8}
%\VignetteIndexEntry{Yupana: coding workflow}
%\VignetteEngine{knitr::rmarkdown}
always_allow_html: true
editor_options:
chunk_output_type: console
---
Expand Down
18 changes: 9 additions & 9 deletions vignettes/heritability.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ title: "Broad-sense heritability in plant breeding"
description: 'How to calculate the heritability in plant breeding'
author: "Maria Belen Kistner & Flavio Lozano-Isla"
output:
# bookdown::pdf_book:
# keep_tex: true
bookdown::html_document2:
base_format: rmarkdown::html_vignette
toc: true
Expand Down Expand Up @@ -34,18 +36,17 @@ Broad-sense heritability ($H^2$) is defined as the proportion of phenotypic vari

There are two main reasons why heritability on an entry-mean basis is of interest in plant breeding [@schmidt2019Heritability]:

1. It is plugged into the breeder’s Equation to predict the response to selection.
2. It is a descriptive measure used to assess the usefulness and precision of results from cultivar evaluation trials.
1. It is plugged into the breeder’s Equation to predict the response to selection.
2. It is a descriptive measure used to assess the usefulness and precision of results from cultivar evaluation trials.

## Breeder´s equation

$$\Delta G=H^2S$$
Where:
$$\Delta G=H^2S$$ Where:

- $\Delta G$ is the genetic gain
- $S$ is the mean phenotypic value of the selected genotypes, expressed as a deviation from the population mean.
- $\Delta G$ is the genetic gain
- $S$ is the mean phenotypic value of the selected genotypes, expressed as a deviation from the population mean.

# Usual Problems
# Usual Problems

In practice, most trials are conducted in a multienvironment trial (MET) presente unbalanced data as not all cultivars are tested at each environment or simply when plot data is lost or when the number of replicates at each location varies between genotypes [@schmidt2019Estimating]. However, the standard method for estimating heritability implicitly assumes balanced data, independent genotype effects, and homogeneous variances.

Expand Down Expand Up @@ -150,12 +151,11 @@ hr$outliers$random %>% kable(caption = "Outliers random model")

# Comparison: H2cal and asreml

> https://inkaverse.com/articles/extra/stagewise.html
> <https://inkaverse.com/articles/extra/stagewise.html>
::: {#refs}
:::

```{r references, echo=FALSE}
if(!file.exists("files/pkgs.bib")){write_bib(c(.packages()),'files/pkgs.bib')}
```

Binary file not shown.
10 changes: 9 additions & 1 deletion vignettes/rticles.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@
title: "Rticles"
description: 'Rticles: scientific documents with R'
author: "Flavio Lozano-Isla"
output: rmarkdown::html_vignette
output:
bookdown::pdf_book:
keep_tex: true
bookdown::html_document2:
base_format: rmarkdown::html_vignette
toc: true
number_sections: false
pkgdown:
as_is: true
vignette: >
%\VignetteIndexEntry{Rticles}
%\VignetteEngine{knitr::rmarkdown}
Expand Down

0 comments on commit 6b4fcd2

Please sign in to comment.