envio com inclusão da linha de ugms, mas falta resolver a inclusão da linha e outras coisas.

This commit is contained in:
2023-09-28 15:25:12 -03:00
parent 7a544c3c93
commit 6cfa773444
8 changed files with 2976 additions and 158 deletions

26
EvolucaoVitruvio.R Normal file
View File

@ -0,0 +1,26 @@
library (data.table)
library(tidyr)
library(dplyr)
library (ggplot2)
Evol_exist <- fread("data/Tabela4.csv", check.names =FALSE, header=TRUE)
str(Evol_exist)
#Transpor a tabela
Evol_exist1<-dcast(melt(Evol_exist, id.vars="Ano"),variable ~Ano)
# deu um trabalho para n ão aparecer uma linha nova com os nomes da colunas...
str(Evol_exist1)
Evoluc<-Evol_exist1%>%
pivot_longer(!variable, names_to="Categoria", values_to="Cabecas")%>%
dplyr::mutate(Ano=variable)
#View(Evoluc)
str(Evoluc)
Evoluc<-ggplot(Evoluc, aes(x=Ano, y=Cabecas, group = Categoria))+
geom_line (aes(color=Categoria))+
geom_point(aes(color=Categoria))
getwd()
png(filename="fig/Evoluc1.png")
plot(Evoluc)
Evoluc