library(chemistr)

Data

#Molar Absorptivity Calculation using a 1-point calibration.  

Blue_Stock <-   #Report the concentration of blue dye in your stock solution units = M (moles/L).

Blue_Abs <-   #Report the absorbance of the stock blue dye.

Pathlength <-  #Report the pathlength of the cuvette, units = cm

Molar_Absorptivity_Constant <-  #Calculate the molar absorptivity constant using Beer's Law - Absorbance = Molar Absorptivity Constant* Path Length * Concentration.

Calibration <- data.frame(Blue_Stock, Blue_Abs, Pathlength, Molar_Absorptivity_Constant)
Calibration

#Run your chunk and record the results in question #1 of the worksheet.
#Trial #1 Data.  You'll need to copy and past this chunk for each trial.  Make sure you change the variable names to reflect the trial number.

T1 <- read.csv("File location and name") #After uploading your csv data files into RStudio and saving them to the same folder that you saved this .rmd file to, then you can use this code to import the data into your report.

T1 <- subset(T1, Absorbance >= 0.05) #Limit the graphed values by using this code. In this code only the data which has absorbance greater than or equal to 0.05 will be used.  Data below this is below the quantitative range of the spectrophotometers. 

Con_1 <-  #Calculate the concentration of blue food dye at each time point by converting the absorbance variable into concentration using Beer's law. To use a specific variable from your dataset use the code variable$dataset.  For example, if I want to call the absorbance values from dataset T1, I would use T1$absorbance.

Time_1 <- T1$Time #create a time variable from the input dataset.

T1_Data <- data.frame(Time_1, Con_1) #create a new dataframe for graphing

# Here is a R chunk where you will create a graph with your kinetics data. Note: ln (natural log) in R is log().  You'll need to copy and paste this chunk for each trial.  Make sure you change the variable names to reflect the trial number. 

chem_scatter(data = T1_Data, xvar = Time_1, yvar = Con_1, xlab = "Label Axis", ylab = "Label Axis", reg_line=TRUE) #This is the info for making the graph.  You will need to input your data and variables to reflect your naming system and the integrated rate law you are modeling. For example, if you are modeling a second order reaction the yvar = 1/Concentration.

fit1a <- lm(Con_1~Time_1, T1_Data)  #This is how we get the fit values out.  The function lm() should be filled out using the following scheme: lm(Y-Variable ~ X-Variable, data = DataFrame Name)

summary(fit1a) #This will show the fit parameters in your document.  

#Run this chunk and record the order and R^2 value in your notebook.  Then update this chunk to reflect a different order integrated rate law.  Run again and record the new R^2 value in your notebook.  Continue through order = 0, 1, and 2.  Then complete question #4 on your worksheet with the trial #1 results.  Next, copy and paste your best fit graph into question #5.  Use the fit parameters to write your caption.
#Trial #2 Data and Graphing, using the integrated rate law order determined for trial #1.
#Record the k' value from the graph in question #7 of the worksheet.
#Trial #3 Data and Graphing, using the integrated rate law order determined for trial #1.
#Record the k' value from the graph in question #7 of the worksheet.
#Trial #4 Data and Graphing, using the integrated rate law order determined for trial #1.
#Record the k' value from the graph in question #7 of the worksheet.
#Trial #5 Data and Graphing, using the integrated rate law order determined for trial #1.
#Record the k' value from the graph in question #7 of the worksheet.
#Trial #6 Data and Graphing, using the integrated rate law order determined for trial #1.
#Record the k' value from the graph in question #7 of the worksheet.
#Determine the order in terms of bleach by graphing log10(k') versus log10[OCl-].

#From your tables in question #2 and question #7 report the following data:

Bleach <- c() #Concentrations of hypochlorite for trials.

k_prime <- c() #k' values from each trial.

Bleach_order <- data_frame(Bleach, k_prime)

chem_scatter(data = , xvar = , yvar = , xlab = "X label", ylab = "Y label", reg_line=TRUE) #This is the info for making the graph.  You will need to input your data and variables to reflect your naming system and the integrated rate law you are modeling. For example, in this model the yvar = log10(k_prime).

fit7 <- lm()  #This is how we get the fit values out.  The function lm() should be filled out usng the following scheme: lm(Y-Variable ~ X-Variable, data = DataFrame Name)

summary(fit7) #This will show the fit parameters in your document. 

#Copy and paste your graph into question #8.  Use the fit parameters to write your caption.
#Based upon all of your results so far, calculate the average and 95% confidence interval for the rate constant (k) of this reaction.  Copy and paste the code from your 95% confidence interval calculator (from the leaf decay lab) into this section.  Then report the results in question #10.


ismayc/chemistr documentation built on Feb. 4, 2023, 12:44 p.m.