My sheet 3 (s3) has 25 columns and my sheet 4 (s4) has two columns. I would like to merge my 2 columns from sheet 4 on the right side of the 25 columns in sheet 3 so that I end up with 27 columns on sheet 3. I need to do this in r. Also, my sheet 4 has 58 rows while my sheet 3 has 163 rows. When I run s3, the error I get is: "Error in [<-.data.frame(tmp, , 26, value = c("AUD/CZK", "AUD/HUF", : replacement has 57 rows, data has 162|". I tried something but it didn't work:
library(openxlsx)
s3 <- readWorkbook('I inserted file path here', sheet = 3)
s4 <- readWorkbook('I inserted file path here', sheet = 4)
s3[ ,26] <- s4[ ,1]
s3[ ,26]
s3[ ,27] <- s4[ ,2]
s3