I made an R object whilst reading an xlsx file, like so -
a = read.xlsx("Global_Manifest.xlsx", sheetIndex=1, colName=T)
a <- a[a$visit.1=="SCR" & a$processed.data.available == 1,]
a$sampleName <- paste(a$best.response,a$subject,a$visit.1,"VAF=",a$AF)
The result of a$sampleName is something like this "TM 700-666 SCR VAF= 0.46"
However once my analysis is done, I would like to match back the a$sampleName to get a$gender information for each of the results. Gender is one of the header in the Global_Manifest.xlsx file.
The idea is to visualise the results by stacked barplot to see difference between the results profile in men and women subjects.
Could anyway suggest an easy way to split the a$sampleName object and match with the a$best.response,a$subject,a$visit.1,a$AF and if all matches, get the a$gender.