[R] Suggestion for posting guide

Gabor Grothendieck ggrothendieck at myway.com
Thu Aug 19 15:17:21 CEST 2004


I have a suggestion for the posting guide.  One problem with some posts is that
they do not provide an example that can be reproduced.   I think that many
people just do not know how to easily specify some data and some technical
assistance should be provided in the posting guide.  If the problem
depends on specific data they should be made aware, in the posting guide, of:

   dput(x) 

since that outputs object x as R code which can then be easily copied from the
post and pasted into a session.  If its not dependent on particular data they
can generate patterned or random data IF THEY KNOW HOW but many might find it
easier to just use one of the included datasets so some guidance should be
provided on the contents of a few of them, e.g.

R comes with built in data sets.  data() will list them, data(iris) will
attach data set iris and ?iris, str(iris), summary(iris), head(iris)
and dput(iris) will give more information on iris (after attaching it).
The following are a few of the datasets that come with R:

   iris - data frame with 4 numeric columns and one 3 level factor
   nhtemp - a ts class time series 
   faithful - data frame with two numeric columns
   warpbreaks - data with a numeric column, a 2-level factor & a 3-level factor

Also letters, LETTERS, month.abb and month.name are built in character vectors
that do not require a data statement to access.




More information about the R-help mailing list