gravity                 package:pad                 R Documentation

_P_A_D  -  _G_r_a_v_i_t_y _d_a_t_a

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

     The 'gravity' data frame has 22 rows and 2 columns.

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

     data(gravity)

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

     This data frame contains the following columns:

     _t_i_m_e a numeric vector with time taken to fall (seconds)

     _d_i_s_t_a_n_c_e a numeric vector with vertical distance fallen (cm)

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

     These data are from an undergraduate experiment to estimate the
     value of the gravitational constant, _g_ (the acceleration of a
     free-falling body at the earth's surface). For each replicate of
     the experiment (row of data) a ball-bearing was released from a
     pre-determined height above the  workbench and the time taken
     before the ball-bearing hit the workbench was recorded, as
     described in the lecture notes.

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

     ##
     ## Loading the data
     ##
     data(gravity)
     ##
     ## Attaching the data frame
     ##
     attach(gravity)
     ##
     ## Ploting original data
     ##
     plot(distance, time)
     ##
     ## Now including the intercept
     ##
     plot(distance, time, xlim=c(0,max(distance)), ylim=c(0,max(time)))
     ##
     ## transforming the distances vector
     ##
     dt <- sqrt(distance)
     plot(dt, time, xlim=c(0,max(dt)), ylim=c(0,max(time)))
     ##
     ## plotting fitted models without and with intercept
     ##
     abline(lm(time~dt-1))
     abline(lm(time~dt), lty=2)
     ##
     detach()

