ndays                package:quantmod                R Documentation

_N_u_m_b_e_r _o_f _P_e_r_i_o_d_s _i_n _D_a_t_a

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

     Calculate the number of specified periods in a given time series
     like data object.

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

     nseconds(x)
     nminutes(x)
     nhours(x)
     ndays(x)
     nweekdays(x)
     nweeks(x)
     nmonths(x)
     nquarters(x)
     nyears(x)

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

       x: A vector inheriting from POSIXt or Date, or a zoo object
          indexed by such vector 

_D_e_t_a_i_l_s:

     Essentially a wrapper to 'breakpoints' with the appropriate period
     specified; the resulting value derived from counting the breaks.

     As a compromise between simplicity and accuracy, the results will
     always round up to the nearest complete period. So n**** - 1 will
     return the completed periods.

     For finer grain detail one should call a higher frequency n****
     function.

     An alternative summary can be found with 'periodicity' and
     'unclass(periodicity(x))'.

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

     The number of observations for the period type specified

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

     Jeffrey A. Ryan

_S_e_e _A_l_s_o:

     'days', 'weeks', 'weekdays'

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

     ## Not run: 
     getSymbols("QQQQ")

     ndays(QQQQ)
     nweeks(QQQQ)
     ## End(Not run)

