> -----Original Message----- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Wu Gong > Sent: Thursday, July 22, 2010 9:44 AM > To: r-help@r-project.org > Subject: Re: [R] how to force a table to be square? > > > Hi William, > > I'm curious about that you used d[] <- lapply(d, factor... > Could you please tell me if there are any differences between > d[] and d?
lappy(dataFrame, ...) returns a "list", not a "data.frame" so d<-lapply(d, factor) would result in d being a list. d[]<-newValue pushes the new values into the existing structure of d, generally leaving the attributes (e.g., class) alone. Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > Thank you. > > ----- > A R learner. > -- > View this message in context: > http://r.789695.n4.nabble.com/how-to-force-a-table-to-be-squar e-tp2298707p2298965.html > Sent from the R help mailing list archive at Nabble.com. > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.