Hello! I'm a newbie and I need some help using R.
The thing is that I got two data bases related with COVID-19
dataC<- read.csv("https://raw.githubusercontent.com/MinCiencia/Datos-COVID19/master/output/producto3/CasosTotalesCumulativo.csv", header = T, sep =",")
dataF <- read.csv("https://raw.githubusercontent.com/MinCiencia/Datos-COVID19/master/output/producto14/FallecidosCumulativo.csv", header = T, sep =",")
, the thing is that I don't know how to add a column when the number of rows differ from each other.
I also re-order them, replacing the columns for rows and viceversa using this:
#For dataC
ndataC<- data.frame(t(dataC[-1]))
colnames(ndataC) <- dataC[, 1]
ndataC
### For dataF
ndataF <- data.frame(t(dataF[-1]))
colnames(dataF) <- dataF[, 1]
dataF
Once doing this, I decided to choose any column, for example: Coquimbo (ndataC$Coquimbo and ndataF$Coquimbo). As you can see from these two, they have different number of rows, which they can't be put together, how ever I saw some codes which they added 0 in replacement, but most of them (due to my poor knowledge) didn't work for me. What I'm trying to do is add 0 where the dates from ndataF, doesn't exist.
Last but not least, how do I remove those X from the data? Thank you very much for your time!
Any suggestion about how to improve with R will be appreciated it!