[R] Making a table

Frederic Ntirenganya ntfredo at gmail.com
Tue Sep 2 10:34:51 CEST 2014


Dear All,

I want to make a table in the attached document.

The attached documents are dataset in csv format and the type of the table
I want to produce.

I made the following approach but it is not giving me what I want.

## read data
library(reshape2)
motorcycle=read.csv("/home/fredo/Desktop/Table2.csv")
#head(motorcycle)
#summary(motorcycle)

motorcycle2<-acast(motorcycle,
General.attribute~Basic.attribute,value.var=" Type.of.motorcycle")

It gives me this output:

                             braking stability  bumpy bends    clutch
operation feel at control fuel economy gearbox operation
                    Kawasaki G(0.5), E(0.5)     A(0.5), G(0.5) A(0.8)
         P(1.0)          A(1.0)       A(0.5), G(0.5)
overall performance <NA>     <NA>               <NA>           <NA>
         <NA>            <NA>         <NA>
                    headlights horn   Manoeuvrability mirrors
quality of finish quietness      responsiveness seat comfort
                    G(1.0)     A(1.0) A(1.0)          A(0.5), G(0.5)
P(0.5), I(0.5)    I(0.5), A(0.5) <NA>           G(1.0)
overall performance <NA>       <NA>   <NA>            <NA>
<NA>              <NA>           E(0.8)         <NA>
                    starting steering stopping power top speed
stability vibration
                    G(1.0)   E(0.9)   G(1.0)         E(1.0)
  G(1.0)
overall performance <NA>     <NA>     <NA>           <NA>
  <NA>


Any help is welcome.


Best regards,

Frederic.





-- 
Frederic Ntirenganya
Maseno University,
Kenya.
Mobile:(+254)718492836
Email: fredo at aims.ac.za
https://sites.google.com/a/aims.ac.za/fredo/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: table.png
Type: image/png
Size: 302085 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20140902/6ec27a5d/attachment.png>


More information about the R-help mailing list