I have an csv file and i want to get a specialized output with just typing in the ID (PIPAPNr) for a letter for example input = PIPAP1147
output Roger Nadal 11.07.1993
Pipapnr="PIPAP1147"
for (i in 1:nrow(Patienten)){
if (Patienten$PIPAP.Nr.==Pipapnr)
DOB<- (Patienten$Geburtsdatum[i])
Name<- (Patienten$Name[i])}
The error is
In if (Patienten$PIPAP.Nr. == Pipapnr) DOB <- (Patienten$Geburtsdatum[i]) :
the condition has length > 1 and only the first element will be used