Skip to content

Commit

Permalink
Tira as aspas dos arquivos de saída .tsv.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuberculo committed Jun 27, 2020
1 parent 4d2130d commit d80d7f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CalcFatorPCH.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ FatorPCH <- mutate(FatorPCH, YEAR = year(Data), MONTH = month(Data), DAY = day(D
FatorPCH <- mutate(group_by(FatorPCH, Subsistema, MONTH), VazMedMens = mean(Vazao), fator = Vazao / VazMedMens)
FatorPCH <- pivot_wider(FatorPCH, names_from = Subsistema, values_from = fator, id_cols = c(YEAR, MONTH, DAY))
FatorPCH <- mutate(FatorPCH, across(where(is.double), round, 3))
write.table(FatorPCH, paste0("FatorPCH.tsv"), sep = "\t", dec = ",", row.names = FALSE)
write.table(FatorPCH, paste0("FatorPCH.tsv"), sep = "\t", dec = ",", row.names = FALSE, quote = FALSE)

Arquivo <- "C:/Users/malta/AppData/Local/Temp/~PLEXOS/0b9c23e3-de92-43ff-a02f-e17c98e4a6c4/Entradas/Vazoes/FatorPCH - Copia.tsv"
dados <- read_tsv(Arquivo, locale = locale(decimal_mark = ","))
Expand Down
6 changes: 3 additions & 3 deletions Principal.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ VazIncrMesPlexosMedia <- FormatoPlexos(Vaz2029MensalIncrMedia, casc2029longa, FA
# Cria arquivos tsv
if (SubstArtificiais) NomeArq <- "Naturais" else NomeArq <- "Artificiais"

write.table(VazIncrMesPlexos, paste0("VazIncrMesPlexos_PDE", NomeArq, ".tsv"), sep = "\t", dec = ",", row.names = FALSE)
write.table(VazIncrMesPlexosMedia, paste0("VazIncrMesMediaPlexos", NomeArq, ".tsv"), sep = "\t", dec = ",", row.names = FALSE)
write.table(VazIncrDiaPlexos, paste0("VazIncrDiaPlexos", NomeArq, ".tsv"), sep = "\t", dec = ",", row.names = FALSE)
write.table(VazIncrMesPlexos, paste0("VazIncrMesPlexos_PDE", NomeArq, ".tsv"), sep = "\t", dec = ",", row.names = FALSE, quote = FALSE)
write.table(VazIncrMesPlexosMedia, paste0("VazIncrMesMediaPlexos", NomeArq, ".tsv"), sep = "\t", dec = ",", row.names = FALSE, quote = FALSE)
write.table(VazIncrDiaPlexos, paste0("VazIncrDiaPlexos", NomeArq, ".tsv"), sep = "\t", dec = ",", row.names = FALSE, quote = FALSE)

ggplot(filter(Vaz2029DiariaIncr, Posto == 169, Data < as_date("1985/01/01"), Data > as_date("1983/01/01"))) + geom_line(aes(x = Data, y = VazIncrcomTV), colour = "blue") + geom_line(aes(x = Data, y = VazIncr), colour = "red") + geom_line(aes(x = Data, y = Vazao)) + geom_line(aes(x = Data, y = VazMontTotal), colour = "orange") + geom_line(aes(x = Data, y = VazMontTotalcomTV), colour = "green")
left_join(Vaz2029DiariaIncr, select(casc2029longa, posto, NomePlexos), by = c("Posto" = "posto")) %>% filter(is.na(NomePlexos)) %>% distinct(Nome) %>% print(n = 40)
Expand Down

0 comments on commit d80d7f7

Please sign in to comment.