Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Poppy Miller
sourceR
Commits
4a5f45e8
Commit
4a5f45e8
authored
Apr 11, 2017
by
Chris Jewell
Browse files
Added 'array' to S3 class list in posterior.
parent
fd6cefce
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/posterior.R
View file @
4a5f45e8
...
...
@@ -26,12 +26,15 @@ Posterior_HaldDP = R6::R6Class(
'iter'
=
1
:
n_iter
)
)
class
(
self
$
alpha
)
=
append
(
class
(
self
$
alpha
),
'array'
)
self
$
q
=
to.tensor
(
NA
,
dim
=
list
(
'type'
=
namesTypes
,
'iter'
=
1
:
n_iter
))
class
(
self
$
q
)
=
append
(
class
(
self
$
q
),
'array'
)
self
$
s
=
to.tensor
(
NA
,
dim
=
list
(
'type'
=
namesTypes
,
'iter'
=
1
:
n_iter
))
class
(
self
$
s
)
=
append
(
class
(
self
$
s
),
'array'
)
self
$
r
=
to.tensor
(
NA
,
dim
=
list
(
...
...
@@ -41,6 +44,7 @@ Posterior_HaldDP = R6::R6Class(
'iter'
=
1
:
n_iter
)
)
class
(
self
$
r
)
=
append
(
class
(
self
$
r
),
'array'
)
},
sample
=
function
(
model
)
{
# Extend the posterior if we need to
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment