Transform a data set to a dataset appropriate for certain OpenBUGS models.

1 | ```
R2Bugsdat1w.data.frame(data, response, treatment, Intercept = FALSE)
``` |

`data` |
a data.frame |

`response` |
a single character string, naming a numeric variable in |

`treatment` |
a single character string, naming a factor variable in |

`Intercept` |
a single logical value, defining, whether an Intercept shall be used for the construction of the design matrix |

For internal use.

a list, containing the elements

`bugsdat ` |
a list of variables appropriate for certain BUGS models |

`parameters ` |
a vector of character strings, naming the parameters to save for a call to OpenBUGS |

`inits ` |
a vector of initial values for the parameters |

`data ` |
the original data set |

`Intercept ` |
a single logical indicating whether an Intercept was used to parameterize the factor variable |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.