Hello.
How to enter the mean in all NA values. I have a code that I read the file, check if it has na and does not, but when I transform in number, several NA appear and if I remove, the data gets well reduced from 4000 to about 600:
df<-read.csv("autores.csv", header=T, stringsAsFactors=F, sep=";")
table(is.na(df)) #não há NA
df_numero<-lapply(df[-1], as.numeric)
#recria o dataframe pois lapply retorna lista
df1<-data.frame(df_numero)
table(is.na(df)) #há NA