remeasureCG | R Documentation |
This function will take common garden measuring forms from a given year and output remeasure forms. It will also output an IMPROVED (final) measure csv for that year. (Final before adding in rechecks and remeasures, that is).
remeasureCG(mf, hf, yr, userNum = 1, write.it = FALSE, write.path = NA)
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") |
hf |
path to the head form for a given common garden experiment in the cgdata repo (e.g. "summer2019/p1MeasureData/2019ExPt1HeadSubform_2019-09-27.txt) |
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 remeasures. 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 three csvs that will save to the folder specified in write.path. The csvs are: remeasureExPt_20__.csv, headsToRemeasureExPt_20__, and updated20__MeasureExPt__Final.csv The remeasure has the list of remeasures and notes of why they're remeasures. It includes all data from original measuring form, so the cgDirector can choose what is important to include and what to exclude. The headsToRemeasure csv has a list of heads that have parts that need remeasuring. It's a reference, as all plants in the headsToRemeasure.csv will also be in the remeasure csv. The updated Measure csv is an improved measure form for a given year. It adds neighbor status and also shifts some data to correct fields. Thus, THIS SHOULD BE CONSIDERED THE NEW FINAL MEASURE FORM FOR THE YEAR (until rechecks and remeasures are implemented, or course!). |
write.path |
path to the folder you want to output the write.it csvs to |
use this function after the first round of field checks are finished for each common garden experiment (exPt 1, 2, or all of 679). This function will pull out all positions that need remeasures due to some form of discrepancy, whether it's an unrealitic measure or just missing data. The output csv remeasureExPt_20__.csv will have explanations for everything that was pulled out. The function will also pull out a head form of remeasures, but that form is simply a reference; all positions in that form will also be in the normal remeasure csv. FINALLY, this function will make minor adjustments to the original measure csv (with field checks implemented). It will output a csv (updated20__MeasureExPt__Final.csv) that has neighborStatus and measurements moved to the correct columns in cases that the measures were in incorrect columns. This should be the new official final measure data frame UNTIL rechecks and remeasures are implemented (into that df, actually). Small bit of text to see if an update worked here.
## Not run: remeasureCG("summer2019/p1MeasureData/2019MeasureExPt1_2019-09-30WithStaplesAndCorrections.csv",
"summer2019/p1MeasureData/2019ExPt1HeadSubform_2019-09-27.txt", 2019, write.it = T, userNum = 4,
write.path = "summer2018/recheckFunctionTests")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.