jobs                  package:DAAG                  R Documentation

_C_a_n_a_d_i_a_n _L_a_b_o_u_r _F_o_r_c_e _S_u_m_m_a_r_y _D_a_t_a (_1_9_9_5-_9_6)

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

     The number of workers in the Canadian labour force broken down by
     region (BC, Alberta, Prairies, Ontario, Quebec, Atlantic) for the
     24-month period from January, 1995 to December, 1996 (a time when
     Canada was emerging from a deep economic recession).

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

     jobs

_F_o_r_m_a_t:

     This data frame contains the following columns:

     _B_C monthly labour force counts in British Columbia

     _A_l_b_e_r_t_a monthly labour force counts in Alberta

     _P_r_a_i_r_i_e_s monthly labour force counts in Saskatchewan and  Manitoba

     _O_n_t_a_r_i_o monthly labour force counts in Ontario

     _Q_u_e_b_e_c monthly labour force counts in Quebec

     _A_t_l_a_n_t_i_c monthly labour force counts in Newfoundland, Nova 
          Scotia, Prince Edward Island and New Brunswick

     _D_a_t_e year (in decimal form)

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

     These data have been seasonally adjusted.

_S_o_u_r_c_e:

     Statistics Canada

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

     print("Multiple Variables and Times - Example 2.1.4")
     sapply(jobs, range)
     pause()

     matplot(jobs[,7], jobs[,-7], type="l", xlim=c(95,97.1))
      # Notice that we have been able to use a data frame as the second argument to matplot().
      # For more information on matplot(), type help(matplot)
     text(rep(jobs[24,7], 6), jobs[24,1:6], names(jobs)[1:6], adj=0)
     pause()

     sapply(log(jobs[,-7]), range)
     apply(sapply(log(jobs[,-7]), range), 2, diff)
     pause()

     oldpar <- par(mfrow=c(2,3))
     range.log <- sapply(log(jobs[,-7], 2), range)
     maxdiff <- max(apply(range.log, 2, diff))
     range.log[2,] <- range.log[1,] + maxdiff
     titles <- c("BC Jobs","Alberta Jobs","Prairie Jobs",
        "Ontario Jobs", "Quebec Jobs", "Atlantic Jobs")
     for (i in 1:6){
     plot(jobs$Date, log(jobs[,i], 2), type = "l", ylim = range.log[,i],
         xlab = "Time", ylab = "Number of jobs", main = titles[i])
     }
     par(oldpar)

