This function extracts the y variable from a set of arguments headed to a caret::train.default model.

1 2 | ```
## Default S3 method:
extractCaretTarget(x, y, ...)
``` |

`x` |
an object where samples are in rows and features are in columns. This could be a simple matrix, data frame or other type (e.g. sparse matrix). See Details below. |

`y` |
a numeric or factor vector containing the outcome for each sample. |

`...` |
ignored |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.