Can anyone help with this error message Error: unexpected '}' in "}" I keep getting when trying to run the following code
for(i in 1:(nrow(RPdta_AU))) {
RPdta_AU[i, RPdta_AU$AU[i]]
%>% 'RPdta_AU$Corr_AU'
}
RPDta_AU has 3 columns RP, AU and Corr_AU. The RP field has an integer in each row and AU field has a list of names in each row, while the Corr_AU field is blank. The integer in RP corresponds to the position of the corresponding author's name in the list of names. The code is to try to extract the corresponding author's name from the AU field and output it to Corr_AU.