Question: Filtering Fibre Variables The Fibre data contains missing values, which are recorded as zeros in the data. Table 5 Use the filter() function to remove

Filtering Fibre Variables The Fibre data contains missing values, which are recorded as zeros in the data. Table 5 Use the filter() function to remove samples (rows) that contain a missing value in any of the weight measurements. Since weights cannot be negative, do that by keeping only the rows that have positive values (> 0) for all the six raw weight measurements. Save the filtered data to a new data table called Lab_Fibre_Filtered. Enter your R code you used: Enter your answer here For the replicate fibre measurements, if there is an absolute difference between the two estimates computed variables "Fibre1" and "Fibre2") equal to or greater than 0.25 units, the sample is discarded. Table 6 UPDATE your code in table 5 to include this maximum fibre difference limit as an additional filtering criteria. Enter your R code you used: Enter your answer here Table 7 Calculate the final fibre estimates by averaging the replicate fibre measurements, "Fibre1" and "Fibre2". Use mutate() to calculate the average fibre and add it as a new variable named "Fibre" to the Lab_Fibre_ Filtered data table. Enter your R code you used: Enter your answer here Finally, we need to filter out any out-of-range measurements. The minimum and maximum values are specified in the environmental threshold variables we initially set-up. The threshold values for fibre are: Thresh. Fibre.min and Thresh.Fibre.max. Table 8 Use a PIPE to sequentially filter the measurements in Lab_Fibre_Filtered to remove the out-of-range fibre values, first keeping only the rows of the data table for which "Fibre" is greater than Thresh. Fibre.min, and then keeping only the resulting rows for which "Fibre" is less than Thresh.Fibre.max. Save the resulting data into the Lab_Fibre_Filtered table. Enter your R code you used
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
