Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
simulateDCE
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dj44vuri
simulateDCE
Commits
ce44d04c
Commit
ce44d04c
authored
4 months ago
by
dj44vuri
Browse files
Options
Downloads
Patches
Plain Diff
modified bcoeff but not working
parent
b432a950
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/sim_choice.R
+9
-2
9 additions, 2 deletions
R/sim_choice.R
with
9 additions
and
2 deletions
R/sim_choice.R
+
9
−
2
View file @
ce44d04c
...
...
@@ -21,7 +21,14 @@ sim_choice <- function(designfile, no_sim = 10, respondents = 330, u ,designtype
message
(
"'simple' is deprecated and will be removed in the future. Use 'exact' instead."
)
}
# Create a lookup table for bcoeff names
bcoeff_lookup
<-
tibble
::
tibble
(
original
=
names
(
bcoeff
),
modified
=
stringr
::
str_replace_all
(
names
(
bcoeff
),
"_"
,
""
)
)
# Replace all underscores in bcoeff names with an empty string
names
(
bcoeff
)
<-
bcoeff_lookup
$
modified
...
...
@@ -130,8 +137,8 @@ transform_util2 <- function() {
`priors\\["`
=
""
,
`"\\]`
=
""
,
`~`
=
"="
,
`\\.`
=
"_"
,
`V
_
`
=
"U_"
#
`\\.` = "_",
## can be deleted when everything works
`V
.
`
=
"U_"
## was originally V_
))
%>%
# Replace only relevant database variables
stringr
::
str_replace_all
(
stats
::
setNames
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment