Thanks a lot for the reply @nirgrahamuk
I tried to implement more code to create a better visualization of the data, which you could reproduce by running the follow code
library(rvest)
library(tidyverse)
library(DT)
url <- "https://www.agerborsamerci.it/listino/web.htm"
htab <- url %>%
read_html() %>%
html_nodes(xpath="//table") %>%
html_table(fill=TRUE)
htab_new<-as.data.frame(htab)
htab_new<-htab_new[,1:7]
htab_new<-htab_new[-1,]
htab_new<-htab_new[-1,]
htab_new<-htab_new[-1,]
htab_new<-htab_new[-1,]
htab_new<-htab_new[-1,]
#htab_new<-htab_new[-2,]
dates_one<-htab_new[1, 2]
dates_two<-htab_new[1, 4]
names(htab_new)<-c("Object",
paste0(dates_one, " - Min"), paste0(dates_one, " - Max"),
paste0(dates_two, " - Min"), paste0(dates_two, " - Max"),
"Difference min", "Difference max")
htab_new<-htab_new[-1,]
htab_new<-htab_new[-1,]
htab_new<-htab_new[-20,]
htab_new<-htab_new[-20,]
htab_new<-htab_new[-20,]
htab_new<-htab_new[-20,]
htab_new<-htab_new[-144,]
htab_new<-htab_new[-144,]
htab_new<-htab_new[-144,]
htab_new<-htab_new[-144,]
htab_new<-htab_new[-144,]
htab_new<-head(htab_new, -3)
datatable(htab_new)
but in some rows I notice that the content is repeated in multiple columns
Could you please tell me how to solve this problem, so that the content is only in one column instead of all columns.
Thank you very much, I appreciate it