-------- Original Message --------
Subject:        general help with R
Date:   Fri, 20 Jan 2012 18:24:35 -0500
From:   Ruth Flatscher <ruth.flatsc...@univie.ac.at>
To:     morphmet@morphometrics.org



Dear Anna Maria,

I understand there are many problems if you start using a statistics
package that requires some programming logics and script writing, if you
have never done such a thing before - that's how I felt in the beginning
with R and I still do very often. I don't know anything really quick,
but there are some small things that helped me a lot.

The introductory manuals are certainly very good to understand the
principle how R works - how you read stuff into R, create objects from
your data and how you apply functions to these objects.
I find it especially important to study the variety of ways how to
select certain parts of your data matrices, because in one way or the
other you'll need that all the time (in case of GM, you might for
example want to leave some individuals out, or use just a subset of
landmark coordinates to do certain things etc.)
For this and other purposes, R project has a short reference card with a
selection of important functions:
http://cran.r-project.org/doc/contrib/Short-refcard.pdf. - I found it
very useful to print it out and have it next to me to look up things.
I also use the R documentation a lot, especially if I want to apply a
new function and don't know how the synthax should be. You just call the
help/documentation by typing "?" followed by the function you want to
use (e.g. ?prcomp for a principal components analysis).
The exact application of functions is very important: R can drive you
crazy by constantly giving you error messages, until you find out that
you have missed out a single damn comma or bracket, or misspelled
something... so better check all that simple stuff twice before you
throw away everything. You'll see after some time you'll get better at
guessing where the mistake could be...

Personally, I find it very helpful to use R with some script
editor/graphic user interface - this is the one I'm using
(http://sourceforge.net/projects/tinn-r/), but there are several out
there (an overview is given here:
http://www.sciviews.org/_rgui/projects/overview.html), maybe you have a
look and see which one you like best. The advantage is that it will show
some part of your script in colour, so that you can see which parts are
R functions (in TinnR, they will be shown in blue), which terms are
logicals, and which are your annotations or comments. In TinnR, you also
see which brackets belong together: if you type a bracket or touch it
with the cursor, it will be highlighted in red, and so will "the other
half". I found this very handy in tracing those wicked little mistakes
mentioned above.

Hope this helps - and may you not be deterred by the strange world of R
language...
Best wishes,
Ruth




On 20 January 2012 20:01, morphmet <morphmet_modera...@morphometrics.org
<mailto:morphmet_modera...@morphometrics.org>> wrote:



    -------- Original Message --------
    Subject: Re: R-package for for shape analysis and mesh operations
    [under  development]
    Date: Fri, 20 Jan 2012 11:25:46 -0500
    From: Anna Maria Vettraino <vettr...@unitus.it
    <mailto:vettr...@unitus.it>>
    To: <morphmet@morphometrics.org <mailto:morphmet@morphometrics.org>>

    Dear all,
    I would take advantage from the discussion…I tried to use R and I felt
    really stupid…do you know a quick guide to learn how use it?
    Thank you in advance

    regards
    AM

    Il giorno 20/01/12 17:13, "morphmet"
    <morphmet_moderator@__morphometrics.org
    <mailto:morphmet_modera...@morphometrics.org>> ha scritto:




        -------- Original Message --------
        Subject: Re: R-package for for shape analysis and mesh
        operations [under
             development]
        Date: Fri, 20 Jan 2012 10:38:07 -0500
        From: ppi...@uniroma3.it <mailto:ppi...@uniroma3.it>
        To: morphmet@morphometrics.org <mailto:morphmet@morphometrics.org>
        CC: morphmet <morphmet@morphometrics.org
        <mailto:morphmet@morphometrics.org>>


        Dear Stefan
        That seems great! There is any help documentation with
        sample files and sample scripts? It would facilitate
        the use of Morpho package...
        Thanks in advance
        Paolo

        -------- Original Message --------
        Subject:        R-package for for shape analysis and mesh
        operations [under
        development]
        Date:   Fri, 20 Jan 2012 04:33:23 -0500
        From:   Stefan Schlager
        <stefan.schlager@uniklinik-__freiburg.de
        <mailto:stefan.schla...@uniklinik-freiburg.de>>
        To: morphmet@morphometrics.org <mailto:morphmet@morphometrics.org>



        Dear all,

        as it seems that more and more people are using R and
        also are working
        with triangular meshes, I also take the opportunity to
        share some
        scripts with you:
        I am developing an R package (which are basically
        functions coded for my
        dissertation) called Morpho which allows a lot of mesh
        operations.
        Including:

           * importing all kinds of mesh formats  (e.g.
        obj,ply,stl,...)
             (file2mesh) and
           * exporting objects of class "mesh3d" to ascii-ply
        format (mesh2ply)
           * operations like TPS deformation, and affine
        transformations based on
             landmark informations (warp.mesh, rotmesh.onto,
        scalemesh),
             including the updating of faces’ normals.
           * the imported objects are of class "mesh3d" so
        that they can be
             rendered by the functions shade3d and wire3d from
        the rgl-package
           * a function (called slider3d) allowing sliding of
        points, surfaces
             and curves (using the bending energy criterion)
        and projecting the
             slidden points back onto the 3D-mesh.
           * There is also a function for semi-automatic
        placement of surface
             patches (place.patch - yet undocumented) onto a
        whole sample based
             on a initially defined atlas configuration.
           * I’ve included functions for im- and exporting
        landmark-data from
             landmark-IDAV (read.pts,write.pts,read.__lmdta) and
        extracting the
             information, if the coordinate belongs to a curve
        or surface from
             imported pts files (c.extract), as I used this
        program to place the
             curves and the atlas surface.
           * There is also a GPA algorithm optimised for speed
        (procSym), useful
             for big sample sizes and many (semi-)landmarks,
        that also allows
             analysis of symmetry/asymmetry.
           * CVA (thanks to M. Rufino from this mailing list
        for providing nice
             examples in the documentation)
           * some permutation tests
           * graphical interface to find outliers (similar to
        MorphoJ)


        And here comes the bad part: I’m a bit behind with
        the documentation, so
        a lot code remains unexplained :(

        If you're interested, you can download precompiled
        packages or the
        source code from
        https://sourceforge.net/__projects/morpho-rpackage/__files/
        <https://sourceforge.net/projects/morpho-rpackage/files/>

        It is optimised for Linux but also works on OSX and
        Windows (with some
        restrictions)!!!

        For the full functionality you must also download some
        command line
        tools which I coded using the header files of the
        meshlab/vcglib project
        (http://meshlab.sourceforge.__net/
        <http://meshlab.sourceforge.net/> ,
        http://vcg.sourceforge.net/__index.php/Main_Page
        <http://vcg.sourceforge.net/index.php/Main_Page>) and
        install them (add
        them to your system’s path). I recently managed to
        compile those not
        only for Linux but also for OSX and Windows.

        Read the README!!

        It’s all licensed under GPL, so you also can rip it
        apart and improve or
        adapt it, if necessary.

        Best regards
        Stefan

        Stefan Schlager M.A.
        Anthropologie
        Medizinische Fakultät der der Albert Ludwigs-
        Universität Freiburg
        Hebelstr. 29
        79104 Freiburg

        Anthropology
        Faculty of Medicine, Albert-Ludwigs-University
        Freiburg
        Hebelstr. 29
        D- 79104 Freiburg

        phone +49 (0)761 203-5522 <tel:%2B49%20%280%29761%20203-5522>
        fax +49 (0)761 203-6898 <tel:%2B49%20%280%29761%20203-6898>







        --
        Paolo Piras
        Center for Evolutionary Ecology
                     and
        Dipartimento di Scienze Geologiche, Università Roma Tre
        Largo San Leonardo Murialdo, 1, 00146 Roma
        Tel: +390657338000 <tel:%2B390657338000>
        email: ppi...@uniroma3.it <mailto:ppi...@uniroma3.it>







Reply via email to