How to replace the char "N" from the column "GID" in the same Row if any of the columns is empty
DataFile <- extract_tables("new.pdf",pages = c(87),
                           method = "stream", output = "data.frame", guess = TRUE)
DataFrame<-as.data.frame(DataFile)
#removing No. and A# from columns
df2<-subset(DataFrame, Group!="No." & Group!="A#") 
output:
GID    ColA    ColB 
1       2       2
2       3       4
3       5       4
4       6       5
5       6       5
NG1     8 
MG2     8       1
MG3     8       1
NG4     8 
Expected output:
GID    ColA    ColB 
1       2       2
2       3       4
3       5       4
4       6       5
5       6       5
G1     8       N
MG2     8       1
MG3     8       1
G4     8       N
DATA:
df1 <-  structure(list(GID = c("1", "2", "3", "4", "5", "NG1", "MG2", 
"MG3", "NG4"), ColA = c(2L, 3L, 5L, 6L, 6L, 8L, 8L, 8L, 8L), 
    ColB = c("2", "4", "4", "5", "5", "", "1", "1", "")), row.names = c(NA, 
-9L), class = "data.frame")
 
                        
By this way you can replace empty char with N or any other character if your choice without mentioning column name
Created on 2021-02-05 by the reprex package (v0.3.0)