## Not run:
# ## generate some data
# set.seed(111)
# n <- 500
#
# ## regressor
# dat <- data.frame(x = runif(n, -3, 3))
#
# ## response
# dat$y <- with(dat, 1.5 + sin(x) + rnorm(n, sd = 0.6))
#
# ## estimate model
# b <- bayesx(y ~ sx(x), data = dat)
#
# ## generate the R script
# ## and print it
# script <- getscript(b)
# script
#
# ## with a pdf device
# script <- getscript(b, device = pdf, height = 5, width = 6)
# script
# ## End(Not run)
Run the code above in your browser using DataLab