[R] Freq in dataframe

Tripoli Massimiliano M.Tripoli at aifa.gov.it
Fri Aug 5 11:43:43 CEST 2016


Dear R users,

# This is my data:

ddat <- array(c(8,10,7,13,8,15,
              7,9,6,9,7,10,
               11,13,7,16,8,16
               ),
              dim = c(2,3,3),
               dimnames = list(
              Time = c("Week 32","Week 52"),
               Dose = c("Dose 1","Dose 2","Dose 3"),
             Group = c("A","B","C")))
ddat

# and I'd like to have data like that:

as.data.frame(UCBAdmissions)

# I tried with 

as.data.frame(ddat) 

# and this is the result:

> as.data.frame(ddat)
        Dose 1.A Dose 2.A Dose 3.A Dose 1.B Dose 2.B Dose 3.B Dose 1.C Dose 2.C Dose 3.C
Week 32        8        7        8        7        6        7       11        7        8
Week 52       10       13       15        9        9       10       13       16       16

Someone could help me ?
Thanks in advance,

M. Tripoli
_________________________

Dott. Massimiliano Tripoli
Ufficio Assessment Europeo - European Assessment Office 
Agenzia Italiana del farmaco - Italian Medicine Agency
Via del Tritone 181 - 00187 Roma
Tel. +39-06-59784643
E-mail: m.tripoli at aifa.gov.it



More information about the R-help mailing list