hcell2xy               package:hexbin               R Documentation

_C_o_m_p_u_t_e _X _a_n_d _Y _C_o_o_r_d_i_n_a_t_e_s _f_o_r _H_e_x_a_g_o_n _C_e_l_l_s

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

     Computes x and y coordinates from hexagon cell id's.

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

     hcell2xy(bin)

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

     bin: hexbin object

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

     The hexbin object contains all the needed information.  The
     purpose of this function is to reduce storage.  The cost is 
     additional calculation.

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

     A list with two components 

       x: 

       y: 

_R_e_f_e_r_e_n_c_e_s:

     see in 'hcell'.

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

     'hcell', 'hray', 'hexbin'

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

     x <- rnorm(10000)
     y <- rnorm(10000)
     bin <- hexbin(x,y)
     xys <- hcell2xy(bin)
     # temporal trends with confidence bounds plotted on a map
     # Illustration only pending access to user functions.
     # mtapply()  #like tapply but for matrices
     # sens.season.slope()  #computes sen's seasonal slope

     ## This part does not work and commented out
     #bin  <- hcell(dat$x,dat$y)   #  x and y are in map projection units
     #newdat < dat[,c('month','year','value')]    # extract columns
     #stats <- mtapply(newdat,bin$cell,sens.season.slope,season=12)
     #plot(mymap,type='l')       # map boundaries in map projection units
     #xy <- hcell2xy(bin)  # x and y coordinates for hexagon cell centers
     #hray(xy$x, xy$y,val=stat[,1],lower= stat[,2],upper=stat[,3])

