recheckCG: Create recheck, staple, and skip data frames for common...

View source: R/cgFunctions.R

recheckCGR Documentation

Create recheck, staple, and skip data frames for common gardens

Description

This function will take common garden measuring forms from a given year and output recheck and future skips/staple data frames.

Usage

recheckCG(mf, yr, userNum = 1, write.it = FALSE, write.path = NA)

Arguments

mf

path to the measure form for a given common garden experiment in cgdata repo. It should have updates implemented from the cgFieldCheck function (e.g. "summer2019/p1MeasureData/2019MeasureExPt1_2019-09-30WithStaplesAndCorrections.csv")

yr

the year the data in the input file was recorded (e.g. 2019)

userNum

the number of visor users you want to assign to do rechecks. Default is one. Visor users will be added in alphabetical order from "vv" in 'build.R'. Make sure the file 'build.R' in cgData has been updated to your year when you run this function. You are encouraged to find and replace users in the final data frame, as the alphabetically first visor users may not be the ones you want to use for rechecks.

write.it

logical: if TRUE, function will output two csvs that will save to the folder specified in write.path. The csvs are: recheckExPt_20__.csv and stapleListExPt120__ or futureSkipsexPt_20__, depending on the plot. The recheck csv has the list of rechecks and recheck actions (skip, search, staple?, etc..). The stapleList csv has the list of new positions to staple this year BEFORE DOING RECHECKS. The futureSkips csv has the list of future skips in p2 or p679 - plants that have been 3 yrs cf. It's mostly just a referenece to prepare data to be collected next field season.

write.path

path to the folder you want to output the write.it csvs to

Details

use this function after measuring and the first round of field checks are finished for each common garden (1, 2, or all of 679). This function will pull out all "Can't Finds" to be rechecked (or skipped) and output a dataFrame of those "Can't Finds" with actions on how to treat them in rechecks. If plants are 3-yr "Can't Finds," this function will pull those out as well and return lists of "staple" positions or "future skips;" these positions will be "pull flags" in the recheck data frame. The previous years' measuring data must be uploaded to the Echinacea Project Website because this function pulls from "core" datasets. That said, it may take a bit to run, as web links to csvs aren't always the quickest.

Examples

## Not run: recheckCG("summer2019/p1MeasureData/2019MeasureExPt1_2019-09-30WithStaplesAndCorrections.csv", 2019, userNum = 6,
write.it = T, write.path = "summer2018/recheckFunctionTests")
## End(Not run)

## Not run: recheckCG("summer2018/p679measureData/2018MeasureHybridExPts_2018-08-02.txt", 2018, userNum = 7,
write.it = F)
## End(Not run)




stuartWagenius/echinaceaLab documentation built on April 13, 2025, 5:22 a.m.