envio com inclusão da linha de ugms, mas falta resolver a inclusão da linha e outras coisas.
This commit is contained in:
26
EvolucaoVitruvio.R
Normal file
26
EvolucaoVitruvio.R
Normal 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
|
||||
Reference in New Issue
Block a user