gravity {pad} | R Documentation |
The gravity
data frame has 22 rows and 2 columns.
data(gravity)
This data frame contains the following columns:
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.
## ## 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()