Skip to content

Commit

Permalink
updt
Browse files Browse the repository at this point in the history
  • Loading branch information
Flavio Lozano-Isla committed Oct 9, 2024
1 parent c687f5e commit 64f9c29
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 59 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@
- Include lattice
- Include LCD
- Dashboard for Tarpuy experiment progress
- Repare agricolae table summary anova
- Export info sort

# inti 0.6.7

- Rticles
- Fix table conversion when only is present one table
- Yupana
- Avoid different bar widths
- New project template info
- Tarpuy
- Update budget template

Expand Down
33 changes: 18 additions & 15 deletions R/tarpuy_plex.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
#' Information for build a plan for an experiment (PLEX)
#'
#' @param data Data with the fieldbook information.
#' @param idea How the idea was born.
#' @param goal The main goal of the project.
#' @param title Project title.
#' @param objectives The objectives of the project.
#' @param hypothesis What are the expected results.
#' @param rationale Based in which evidence is planned the experiment.
#' @param objectives The objectives of the project.
#' @param references References.
#' @param plan General description of the project (M & M).
#' @param institutions Institutions involved in the project.
#' @param researchers Persons involved in the project.
Expand All @@ -19,10 +19,11 @@
#' @param start The date of the start of the experiments.
#' @param end The date of the end of the experiments.
#' @param album link with the photos of the project.
#' @param github link with the github repository.
#' @param repository link to the repository.
#' @param about Short description of the project.
#' @param fieldbook Name or ID for the fieldbook/project.
#' @param gdocs link for Google Docs
#' @param project link for project.
#' @param manuscript link for manuscript.
#' @param nfactor Number of factors for the design.
#' @param design Type of design.
#' @param rep Number of replication.
Expand Down Expand Up @@ -50,11 +51,11 @@
#'

tarpuy_plex <- function(data = NULL
, idea = NULL
, goal = NULL
, title = NULL
, objectives = NULL
, hypothesis = NULL
, rationale = NULL
, objectives = NULL
, references = NULL
, plan = NULL
, institutions = NULL
, researchers = NULL
Expand All @@ -67,8 +68,9 @@ tarpuy_plex <- function(data = NULL
, end = NA
, about = NULL
, fieldbook = NULL
, gdocs = NULL
, github = NULL
, project = NULL
, repository = NULL
, manuscript = NULL
, album = NULL
, nfactor = 2
, design = "rcbd"
Expand Down Expand Up @@ -127,11 +129,11 @@ tarpuy_plex <- function(data = NULL

if ( is.null(data) ) {

plex <- c(IDEA = idea
, GOAL = goal
plex <- c(TITLE = title
, OBJECTIVES = objectives
, HYPOTHESIS = hypothesis
, RATIONALE = rationale
, OBJECTIVES = objectives
, REFERENCES = references
, PLAN = plan
, INSTITUTIONS = institutions
, RESEARCHERS = researchers
Expand All @@ -144,8 +146,9 @@ if ( is.null(data) ) {
, "END EXPERIMENT" = as.character.Date(end)
, ABOUT = info
, "FIELDBOOK NAME" = fbname
, GDOCS = gdocs
, GITHUB = github
, PROJECT = project
, GITHUB = repository
, MANUSCRIPT = manuscript
, ALBUM = album
) %>%
enframe() %>%
Expand Down
11 changes: 6 additions & 5 deletions inst/tarpuy/server.R
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ shinyServer(function(input, output, session) {
plex <- reactive({

plex <- tarpuy_plex(data = NULL
, idea = input$plex_idea
, goal = input$plex_goal
, title = input$plex_title
, objectives = input$plex_objectives
, hypothesis = input$plex_hypothesis
, rationale = input$plex_rationale
, objectives = input$plex_objectives
, references = input$plex_references
, plan = input$plex_plan
, institutions = input$plex_institutions
, researchers = input$plex_researchers
Expand All @@ -238,8 +238,9 @@ shinyServer(function(input, output, session) {
, about = input$plex_about
, fieldbook = input$plex_fieldbook
, album = input$plex_album
, github = input$plex_github
, gdocs = input$plex_gdocs
, project = input$plex_project
, repository = input$plex_repository
, manuscript = input$plex_manuscript
, nfactor = input$plex_nfactors
, design = input$plex_design
, rep = input$plex_rep
Expand Down
72 changes: 43 additions & 29 deletions inst/tarpuy/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -375,37 +375,38 @@ navbarPage(title = HTML('<strong><a target="_blank" href="https://inkaverse.com/
, "altitude"
, "georeferencing"
, "fieldbook"
, "repository"
, "project"
, "manuscript"
, "album"
, "github"
, "gdocs"
)
, selected = c("manager"
, "location"
, "dates"
, "about"
, "environment"
, "gdocs"
, "project"
)
),

textInput(inputId = "plex_logbook"
, label = "Logbook (optional)"
, width = "100%"
, value = NA
, value = "logbook"
, placeholder = "sheet name"
),

textInput(inputId = "plex_timetable"
, label = "Timetable (optional)"
, width = "100%"
, value = NA
, value = "schedule"
, placeholder = "sheet name"
),

textInput(inputId = "plex_budget"
, label = "Budget (optional)"
, width = "100%"
, value = NA
, value = "budget"
, placeholder = "sheet name"
)

Expand Down Expand Up @@ -521,54 +522,67 @@ navbarPage(title = HTML('<strong><a target="_blank" href="https://inkaverse.com/
)

),

conditionalPanel(condition = ' input["plex_fields"].includes("album") ',

textInput(inputId = "plex_album"
, label = "Album"
conditionalPanel(condition = ' input["plex_fields"].includes("project") ',
textInput(inputId = "plex_project"
, label = "Project"
, width = "100%"
, placeholder = "url or link"
, value = NA
)

),

conditionalPanel(condition = ' input["plex_fields"].includes("github") ',
conditionalPanel(condition = ' input["plex_fields"].includes("repository") ',

textInput(inputId = "plex_github"
, label = "Github"
textInput(inputId = "plex_repository"
, label = "Repository"
, width = "100%"
, placeholder = "url or link"
, value = NA
)

),

conditionalPanel(condition = ' input["plex_fields"].includes("gdocs") ',
conditionalPanel(condition = ' input["plex_fields"].includes("manuscript") ',

textInput(inputId = "plex_manuscript"
, label = "Manuscript"
, width = "100%"
, placeholder = "url or link"
, value = NA
)

),

conditionalPanel(condition = ' input["plex_fields"].includes("album") ',

textInput(inputId = "plex_gdocs"
, label = "Google Docs"
textInput(inputId = "plex_album"
, label = "Album"
, width = "100%"
, placeholder = "url or link"
, value = NA
)

)


),

column(width = 5,

h5(icon("flask"), "Experimental plan"),

textAreaInput(inputId = "plex_idea"
, label = "Idea"
, placeholder = "How the idea was born."
textAreaInput(inputId = "plex_title"
, label = "Title"
, placeholder = "Project title"
, width = "100%"
),

textAreaInput(inputId = "plex_goal"
, label = "Goal"
, placeholder = "The main goal of the project."
textAreaInput(inputId = "plex_objectives"
, label = "Objectives"
, placeholder = "Objectives of the project."
, width = "100%"
),

Expand All @@ -584,10 +598,10 @@ navbarPage(title = HTML('<strong><a target="_blank" href="https://inkaverse.com/
, width = "100%"

),

textAreaInput(inputId = "plex_objectives"
, label = "Objectives"
, placeholder = "Objectives of the project."
textAreaInput(inputId = "plex_references"
, label = "References"
, placeholder = "References for the project."
, width = "100%"
),

Expand Down
23 changes: 13 additions & 10 deletions man/tarpuy_plex.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 64f9c29

Please sign in to comment.