This should be used after the TermStandardizer as it relies on the presence of a SampleLocation column which the TermStandardLocation produces.
PolypLocator(dataframe, SampleLocationColumn)
dataframe | The dataframe |
---|---|
SampleLocationColumn | The column containing the SampleLocation from the TermStandardLocation |
mywords<-c("Hospital Number","Patient Name:","DOB:","General Practitioner:", "Date received:","Clinical Details:","Macroscopic description:", "Histology:","Diagnosis:") MypathExtract1<-Extractor(PathDataFrameFinal,"PathReportWhole",mywords) names(MypathExtract1)[names(MypathExtract1) == 'Datereceived'] <- 'Dateofprocedure' MypathExtract1$Dateofprocedure <- as.Date(MypathExtract1$Dateofprocedure) # The polyp locator then determines where the biopsies were taken from # by assessing the SampleLocation column which comes from the # TermStandardLocation function. f<-TermStandardLocation(MypathExtract1,'Histology') mm<-PolypLocator(f,'SampleLocation') rm(MypathExtract1)