Alfalfa               package:SASxport               R Documentation

_E_x_a_m_p_l_e _S_A_S _d_a_t_a _s_e_t

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

     This data set exists to provide an example file for lookup.xport()
     and read.xport()

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

     data(Alfalfa)

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

     A data frame with 40 observations on the following 6 variables.

     '_P_O_P' Population, a factor with levels 'MAX' amd 'min'

     '_S_A_M_P_L_E' Sample ID (0:5)

     '_R_E_P' Replicate (always 1)

     '_S_E_E_D_W_T' Seed weight

     '_H_A_R_V_1' Harvest 1 volume

     '_H_A_R_V_2' Harvest 2 volume

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

     Population "MAX" has slightly higher harvest volumes ('HARV1' and
     'HARV2') than population "min".  (Surprise! Shock!  Awe!)

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

     The 'Alfalfa.xpt' file was obtained from the R 'foreign' package.

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

     data(Alfalfa)

     # go were the data is...
     here <- getwd()
     setwd(file.path(.path.package("SASxport"),"data"))

     # Description of the file contents
     lookup.xport("Alfalfa.xpt")

     # Load the file contents
     Alfalfa <- read.xport("Alfalfa.xpt")
     head(Alfalfa)

     # return home
     setwd(here)

     # Just for fun, plot the data
     par(mfrow=c(1,2))
     plot( HARV1 ~ POP, data=Alfalfa)
     plot( HARV2 ~ POP, data=Alfalfa)

