forked from Hydroenvironment/R-Hydrology-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Trend-Analysis-MK-SEN-ITA
48 lines (43 loc) · 1.43 KB
/
Trend-Analysis-MK-SEN-ITA
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
###############################################################################
# DETECCIÓN DE TENDENCIAS EN SERIES DE TIEMPO ##
# MÉTODOS DE MANN-KENDALL, SEN`S SLOPE Y INNOVATIVE TREND METHOD OF SEN (ITA)##
###############################################################################
#para limpiar la pantalla
clc <- 0
class(clc) <- 'limpiar'
print.limpiar <- function(rObject) cat("\014")
###################################
library(Kendall)
library(trend)
library(openxlsx)
library(trendchange)
library(readxl)
library(dplyr)
library(writexl)
setwd("C:/Users/Julio/Documents/INVESTIGACION/R SCRIPTS") #CARPETA DE TRABAJO
nom_excel<-"ORDENADO_PUERTO INCA.xlsx" #NOMBRES DE HOJAS
nom_hojas<-excel_sheets(nom_excel) #NOMBRES DE LA HOJA
clc
I=1
print(nom_hojas[I])
print("PROMEDIO ")
df <- read.xlsx(nom_excel, sheet = nom_hojas[I]) # HOJA DE EXCEL
mk.test(df$PROM)
sens.slope(df$PROM,conf.level = 0.90 )
sens.slope(df$PROM,conf.level = 0.95 )
sens.slope(df$PROM,conf.level = 0.99 )
innovtrend(df$PROM)
print("MINIMO ")
nom_hojas[I]
mk.test(df$MIN)
sens.slope(df$MIN,conf.level = 0.90 )
sens.slope(df$MIN,conf.level = 0.95 )
sens.slope(df$MIN,conf.level = 0.99 )
innovtrend(df$MIN)
print("MAXIMO ")
nom_hojas[I]
mk.test(df$MAX)
sens.slope(df$MAX,conf.level = 0.90 )
sens.slope(df$MAX,conf.level = 0.95 )
sens.slope(df$MAX,conf.level = 0.99 )
innovtrend(df$MAX)