# cmdStan output to R, or dev branch in Rstan

**URL:** <https://discourse.mc-stan.org/t/cmdstan-output-to-r-or-dev-branch-in-rstan/4975>\
**Category:** Developers\
**Created:** [July 25, 2018, 9:06pm UTC](https://discourse.mc-stan.org/t/cmdstan-output-to-r-or-dev-branch-in-rstan/4975 "2018-07-25T21:06:26Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![anon79882417](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@anon79882417](https://discourse.mc-stan.org/u/anon79882417)\
**Post date:** [July 25, 2018, 9:18pm UTC](https://discourse.mc-stan.org/t/cmdstan-output-to-r-or-dev-branch-in-rstan/4975/5 "2018-07-25T21:18:32Z")

</div>

> [@Rstan::read\_stan\_csv chokes on NaN](http://discourse.mc-stan.org/t/rstan-read-stan-csv-chokes-on-nan/1646):
>
> For some reason rstan will not let me load output files with NaN values (which happen because the model program covers a variety of model types and outputs some irrelevant values). Is there a flag to create the object anyway? \> tp \<- rstan::read\_stan\_csv(csvfiles=dir(pattern='output-chain-.\\.csv')) Error in validObject(.Object) : invalid class “stanfit” object: The following variables have undefined values: predicted\_district\_delta.1,The following variables have undefined values: predi…

has to do with this issue. it doesn’t like nan and quantiles are irrelevant in this setting when we’re using MAP (i think with BFGS we’re optimizing parameters jointly, is MAP the correct way to think about this?).

---

_[View the full topic](https://discourse.mc-stan.org/t/cmdstan-output-to-r-or-dev-branch-in-rstan/4975)._
