I am new in R and in this forum. I would appreciate anyone´s help. I am trying to manipulate a dataframe to reorder the values that comes from a PDF table. I did the PDF extract tables and it looks as follows.
#Extracting the PDF table
pathway <- file.path("./", "0005-LLANO_BONITO_sept_2020.pdf")
llb_sept_20 <- extract_tables(pathway)
llb_sept_20 <- do.call(rbind, llb_sept_20)
llb_sept_20 <- as.data.frame(llb_sept_20)
#Cleaning the dataframe
llb_sept_20_a <- llb_sept_20 %>% select(1,2)
llb_sept_20_b <- llb_sept_20 %>% select(3,4)
llb_sept_20_a_1 <- llb_sept_20_a %>% filter(row_number() %% 7 != 3)
llb_sept_20_a_2 <- llb_sept_20_a_1 %>% filter(row_number() %% 6 != 4)
I need to reorder the values in (2:4, V2); (7:9, V2); (12:14, V2) to be part of the V1 (#ID) look like this:
I would appreciate your help.