Skip to content

Commit

Permalink
fix some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
saudiwin committed Jan 2, 2025
1 parent 3eea5e5 commit 8a2c712
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion R/Helpers.R
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ process_init_pathfinder <- function(init, num_procs, model_variables = NULL,
.check_quoted <- function(quoted=NULL,default_val) {
if(is.null(quoted)) {
quoted <- default_val
} else if(class(quoted)=='character') {
} else if(inherits(quoted,'character')) {
quoted <- as.name(quoted)
quoted <- enquo(quoted)
} else {
Expand Down
4 changes: 2 additions & 2 deletions R/Plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ id_plot_legis <- function(object,return_data=FALSE,
}


if(class(object)=='idealstan') {
if(inherits(object,'idealstan')) {
person_params <- .prepare_legis_data(object,
high_limit=high_limit,
low_limit=low_limit,include=include,
Expand Down Expand Up @@ -635,7 +635,7 @@ id_plot_legis_dyn <- function(object,return_data=FALSE,

}

if(class(object)=='idealstan') {
if(inherits(object,'idealstan')) {
person_params <- .prepare_legis_data(object,
high_limit=high_limit,
low_limit=low_limit,
Expand Down
5 changes: 1 addition & 4 deletions man/id_estimate.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions vignettes/Package_Introduction.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Introduction to Idealstan"
author: "Robert Kubinec"
date: last-modified
format: html
cache: false
vignette: >
%\VignetteIndexEntry{Time-Varying Ideal Points}
%\VignetteEngine{R.rsp::asis}
Expand All @@ -11,12 +12,14 @@ vignette: >

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,warning=FALSE,fig.align = 'center',fig.width=6, fig.height=5)
options(cmdstanr_warn_inits = FALSE)
library(idealstan)
library(dplyr)
library(ggplot2)
library(tidyr)
library(tinytable)
options(cmdstanr_warn_inits = FALSE)
```

*Note: To report bugs with the package, please file an issue on the [Github page](https://github.com/saudiwin/idealstan/issues).*
Expand All @@ -36,7 +39,7 @@ The approach to handling missing data in this package is to model cases where mi
The package includes the following models:

| Model ID | Model Type | Response Type | Missing Data Adjustment |
|-----------------|---------------------|-----------------|-----------------|
|----|----|----|----|
| 1 | IRT 2-PL | Binary | No |
| 2 | IRT 2-PL | Binary | Yes |
| 3 | IRT rating scale | Ordinal | No |
Expand Down
10 changes: 6 additions & 4 deletions vignettes/Time_Series.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ vignette: >

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE,message = FALSE,warning=FALSE,fig.align = 'center',fig.width=6, fig.height=5)
require(idealstan)
require(dplyr)
require(ggplot2)
require(lubridate)
library(idealstan)
library(dplyr)
library(ggplot2)
library(lubridate)
options(cmdstanr_warn_inits = FALSE)
```

*Note: To report bugs with the package, please file an issue on the [Github page](https://github.com/saudiwin/idealstan/issues).*
Expand Down

0 comments on commit 8a2c712

Please sign in to comment.