deviceName          package:RGraphicsDevice          R Documentation

_G_e_t _t_h_e _d_e_s_c_r_i_p_t_i_o_n _f_o_r _a _t_y_p_e _o_f _g_r_a_p_h_i_c_s _d_e_v_i_c_e

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

     This function and its methods allow us to obtain a description or
     name of a graphics device which can be used as the string the
     .Devices list describing the device.

     Programmers can provide a  method for  a new  class of graphics
     device function list, i.e. a sub-class of 'RDevDescMethods'.

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

     deviceName(x, ...)

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

       x: the graphics device details, typically of class
          'RDevDescMethods' or a sub-class thereof. 

     ...: additional parameters for methods

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

     A character vector of length 1.

_N_o_t_e:

     When dealing with graphics devices implemented with R functions
     (via this package), we typically have a single class (DevDesc) of
     graphics device instance. Similarly, we can use the single generic
     'RDevDescMethods' class and specify different functions for
     different types of devices. Alternatively, we can define new
     sub-classes of 'RDevDescMethods' which only differ by providing a
     class identifier to identify the type of device. We can then
     define a method for 'deviceName' for such new sub-classes.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

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

     'graphicsDevice' 'makeGraphicsDeviceObject' which is not exported.

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

      
       setClass("RJSCanvasDevMethods", contains = "RDevDescMethods")
       setMethod("deviceName", "RJSCanvasDevMethods",
                   function(x) 
                      "R JavaScript Canvas")

       m = new("RJSCanvasDevMethods")
       deviceName(m)

       dev = graphicsDevice(m)
       .Devices

