Development

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Newbie guide for plot & graphics functions?

    6 answers - 775 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hello all,
    Can anyone point me to a decent introduction to using the plotting and assorted graphics functions in R?
    I keep getting simple errrors and I can't figure out why, for example:
    image(x,y,z)
    Error in image.default(x, y, z) : dimensions of z are not length(x)(+1) times length(y)(+1)
    length(x)
    [1] 206
    length(y)
    [1] 40
    dim(z)
    [1] 207 41
    It seems to me as if R is wrong matrix z is obviously of length(x)+1 times length(y)+1 just as obviously I'm missing something essential. Are there any "newbie" guides out there for getting started?
    TIA,
    Pete
    [[alternative HTML version deleted]]
    R-help (AT) stat (DOT) math.ethz.ch mailing list
    PLEASE do read the posting guide!
  • No.1 | | 1249 bytes | |

    Pete Cap wrote:

    Hello all,

    Can anyone point me to a decent introduction to using the plotting and assorted graphics functions in R?

    I keep getting simple errrors and I can't figure out why, for example:


    >>image(x,y,z)


    Error in image.default(x, y, z) : dimensions of z are not length(x)(+1) times length(y)(+1)

    >>length(x)


    [1] 206

    >>length(y)


    [1] 40

    >>dim(z)


    [1] 207 41

    It seems to me as if R is wrong matrix z is obviously of length(x)+1 times length(y)+1 just as obviously I'm missing something essential. Are there any "newbie" guides out there for getting started?

    Can you specify a reproducible examples, please?

    Uwe Ligges

    TIA,

    Pete

    [[alternative HTML version deleted]]

    R-help (AT) stat (DOT) math.ethz.ch mailing list

    PLEASE do read the posting guide!

    R-help (AT) stat (DOT) math.ethz.ch mailing list

    PLEASE do read the posting guide!
  • No.2 | | 1801 bytes | |

    If you have a little bit of time, check out Ross Ihaka's Lectures on
    "Information Visualisation". The specific examples he gives are built
    with R:

    ~ihaka/120/

    Time could be required because this stuff is so great that you want to
    read all of it

    Christophe.

    Pete Cap wrote:

    >Hello all,
    >
    >Can anyone point me to a decent introduction to using the plotting and assorted graphics functions in R?


    >I keep getting simple errrors and I can't figure out why, for example:



    >
    >>image(x,y,z)

    >
    >>

    >Error in image.default(x, y, z) : dimensions of z are not length(x)(+1) times length(y)(+1)


    >
    >>length(x)

    >
    >>

    >[1] 206


    >
    >>length(y)

    >
    >>

    >[1] 40


    >
    >>dim(z)

    >
    >>

    >[1] 207 41
    >


    >It seems to me as if R is wrong matrix z is obviously of length(x)+1 times length(y)+1 just as obviously I'm missing something essential. Are there any "newbie" guides out there for getting started?
    >TIA,


    >Pete
    >
    >
    >
    >
    >
    >
    >[[alternative HTML version deleted]]
    >
    >
    >R-help (AT) stat (DOT) math.ethz.ch mailing list
    >
    >PLEASE do read the posting guide!
    >
  • No.3 | | 1946 bytes | |

    I think you have it backwards (the error message not withstanding).
    Read the documentation for image, note the beginning of the Details
    section, and then compare these two examples, both of which succeed
    on my system (R 2.1.1).

    x <- 1:10
    y <- 1:15
    z <- outer(x,y)
    image(x,y,z)

    xb <- c(.5,x+.5)
    yb <- c(.5,y+.5)
    image(x,y,z)

    x and y provide either the centers of the cells, or the boundaries of
    the cells. In the latter case, the lengths of x and y should be 1
    greater than the dim of z, not one less.

    (I'm including my full version info to be complete, but I doubt that
    you problem has to do with your platform [S]).
    -Don

    version
    _
    platform powerpc-apple-darwin7.9.0
    arch powerpc
    os darwin7.9.0
    system powerpc, darwin7.9.0
    status
    major 2
    minor 1.1
    year 2005
    month 06
    day 20
    language R

    At 7:23 AM -0700 7/15/05, Pete Cap wrote:
    >Hello all,
    >
    >Can anyone point me to a decent introduction to using the plotting
    >and assorted graphics functions in R?
    >
    >I keep getting simple errrors and I can't figure out why, for example:
    >
    >image(x,y,z)
    >Error in image.default(x, y, z) : dimensions of z are not
    >length(x)(+1) times length(y)(+1)
    >length(x)
    >[1] 206
    >length(y)
    >[1] 40
    >dim(z)
    >[1] 207 41
    >
    >
    >It seems to me as if R is wrong matrix z is obviously of
    >length(x)+1 times length(y)+1 just as obviously I'm missing
    >something essential. Are there any "newbie" guides out there for
    >getting started?
    >TIA,
    >
    >Pete
    >
    >
    >
    >
    >
    >
    >[[alternative HTML version deleted]]
    >
    >
    >R-help (AT) stat (DOT) math.ethz.ch mailing list
    >
    >PLEASE do read the posting guide!
  • No.4 | | 556 bytes | |

    Hello!
    I have just completed R language binding for VTK library from Kitware.
    The library is used for 3D modelling and data visualization. RVTK
    allows you to do that sort of things in R-session. Because RVTK is in
    quite an alpha stage it is not yet on CRAN and can be downloaded from my
    homepage: . The link to the
    tarball is on the bottom of page after a long introduction (if you are
    intended to use RVTK better do read it).

    R-help (AT) stat (DOT) math.ethz.ch mailing list

    PLEASE do read the posting guide!
  • No.5 | | 556 bytes | |

    Hello!
    I have just completed R-language binding for VTK library from Kitware.
    The library is used for 3D modelling and data visualization. RVTK
    allows you to do that sort of things in R-session. Because RVTK is in
    quite an alpha stage it is not yet on CRAN and can be downloaded from my
    homepage: . The link to the
    tarball is on the bottom of page after a long introduction (if you are
    intended to use RVTK better do read it).

    R-help (AT) stat (DOT) math.ethz.ch mailing list

    PLEASE do read the posting guide!
  • No.6 | | 3144 bytes | |

    Significant goof in my first message. Here is the corrected version:

    x <- 1:10
    y <- 1:15
    z <- outer(x,y)
    image(x,y,z)

    xb <- c(.5,x+.5)
    yb <- c(.5,y+.5)
    image(xb,yb,z) ## xb, yb NT x, y

    Fortunately, corrected one also succeeds.
    -Don

    At 8:06 AM -0700 7/15/05, Don MacQueen wrote:
    >I think you have it backwards (the error message not withstanding).
    >Read the documentation for image, note the beginning of the Details
    >section, and then compare these two examples, both of which succeed
    >on my system (R 2.1.1).
    >
    >x <- 1:10
    >y <- 1:15
    >z <- outer(x,y)
    >image(x,y,z)
    >
    >xb <- c(.5,x+.5)
    >yb <- c(.5,y+.5)
    >image(x,y,z)
    >
    >x and y provide either the centers of the cells, or the boundaries of
    >the cells. In the latter case, the lengths of x and y should be 1
    >greater than the dim of z, not one less.
    >
    >(I'm including my full version info to be complete, but I doubt that
    >you problem has to do with your platform [S]).
    >
    >-Don
    >
    >version

    _
    >platform powerpc-apple-darwin7.9.0
    >arch powerpc
    >os darwin7.9.0
    >system powerpc, darwin7.9.0
    >status
    >major 2
    >minor 1.1
    >year 2005
    >month 06
    >day 20
    >language R
    >
    >
    >At 7:23 AM -0700 7/15/05, Pete Cap wrote:
    >>Hello all,
    >>
    >>Can anyone point me to a decent introduction to using the plotting
    >>and assorted graphics functions in R?
    >>
    >>I keep getting simple errrors and I can't figure out why, for example:
    >>

    image(x,y,z)
    >>Error in image.default(x, y, z) : dimensions of z are not
    >>length(x)(+1) times length(y)(+1)

    length(x)
    >>[1] 206

    length(y)
    >>[1] 40

    dim(z)
    >>[1] 207 41
    >>
    >>
    >>It seems to me as if R is wrong matrix z is obviously of
    >>length(x)+1 times length(y)+1 just as obviously I'm missing
    >>something essential. Are there any "newbie" guides out there for
    >>getting started?
    >>TIA,
    >>
    >>Pete
    >>
    >>
    >>
    >>
    >>
    >>
    >>[[alternative HTML version deleted]]
    >>
    >>
    >>R-help (AT) stat (DOT) math.ethz.ch mailing list
    >>
    >>PLEASE do read the posting guide!

    >
    >


    >
    >Don MacQueen
    >Environmental Protection Department
    >Lawrence Livermore National Laboratory
    >Livermore, CA, USA
    >
    >
    >R-help (AT) stat (DOT) math.ethz.ch mailing list
    >
    >PLEASE do read the posting guide!

Re: Newbie guide for plot & graphics functions?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 3 + 2 =
QUESTION ON "Development"

EMSDN.COM