mergeStation            package:clim.pact            R Documentation

_M_e_r_g_e _c_l_i_m_a_t_e _s_t_a_t_i_o_n _s_e_r_i_e_s.

_D_e_s_c_r_i_p_t_i_o_n:

     Merges two series from different sources, eg from NACD (`getnacd')
     and DNMI (`getdnmi'). The code is useful for updating long climate
     series with new observations from a different database. The
     routine cokpares data for overlapping times and prints out
     diagnostics about the two data sets.

_U_s_a_g_e:

     mergeStation(x.1,x.2,plot=FALSE)

_A_r_g_u_m_e_n_t_s:

     x.1: 1st series.

     x.2: 2nd series.

    plot: 'TRUE' plots the overlap.

_V_a_l_u_e:

     A climate station series object.

_A_u_t_h_o_r(_s):

     R.E. Benestad

_E_x_a_m_p_l_e_s:

     oslo.1 <- getnacd("OSLO-BLINDERN")
     oslo.2 <- getdnmi("oslo")
     print(range(oslo.1$yy))
     #[1] 1890 1990
     print(range(oslo.2$yy))
     #[1] 1937 2002
     oslo <- mergeStation(oslo.1,oslo.2)
     #[1] "Time intervals:"
     #[1] 1890 1990
     #[1] 1937 2002
     #[1] 1937.042 1990.958
     #[1] "RMSE:  0.04"
     #
     #Call:
     #lm(formula = y ~ 1 + x, data = ovrlp)
     #
     #Residuals:
     #     Min       1Q   Median       3Q      Max 
     #-7.24005 -0.03271  0.01161  0.06006  7.61593
     #Coefficients:
     #            Estimate Std. Error t value Pr(>|t|)    
     #(Intercept) 0.029044   0.047482   0.612    0.541    
     #x           0.993886   0.004866 204.231   <2e-16 ***
     #---
     #Signif. codes:  0 `***' 0.001 `**' 0.01 `*' 0.05 `.' 0.1 ` ' 1 
     #
     #Residual standard error: 0.9738 on 644 degrees of freedom
     #Multiple R-Squared: 0.9848,    Adjusted R-squared: 0.9848 
     #F-statistic: 4.171e+04 on 1 and 644 DF,  p-value: < 2.2e-16

     print(range(oslo$yy))
     #[1] 1890 2002

