Why don't you try it and see? data.frame(x=1:5, y=letters[1:5]) expand.grid(x=1:5, y=letters[1:5])
?data.frame ?expand.grid On Fri, Jun 28, 2013 at 8:30 AM, Zhaoran Zhou <zhaoran1...@gmail.com> wrote: > Hello everyone, > > i found that both of the 2 functions ("expand.grid" and "data.frame") can > be used to produce data frame. are there any difference between them? > > thanks for your help! > > zhaoran > > [[alternative HTML version deleted]] > > ______________________________________________ > 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.