PROBLEM 1

SPECTRAL ANALYSIS:

#setwd("/Source files")
p<-read.csv("p.spectra.csv")
x<-p$lam
y<-p$absorb
par(mfrow=c(1,1))
plot(x,y,col="red",xlab ="Lambda",ylab ="Absorbance",cex=0.3,main ="Wavelength Vs Absorbance")

m<-which(x>500&x<700)
length(m)
## [1] 1036
wv<-x[m]
AA<-y[m]
length(wv)
## [1] 1036
max(AA)
## [1] 0.386
max(wv)
## [1] 699.95
plot(wv,AA,col="blue",xlab ="Lambda",cex=0.5,ylab ="Absorbance",main ="Wavelength Vs Absorbance")
maxi<-max(AA)
z<-which(AA==maxi)
l<-wv[z]
wv[z]
## [1] 618.08
text(575,0.390,"wvmax=618.08~~~~~",col ="red")
abline(v=(618.08),col="red")