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
rdiagnosis
basicr
Commits
d3402e19
Commit
d3402e19
authored
Sep 10, 2019
by
Jean-Marie Lepioufle
Browse files
correct error with 'value'
parent
ea2cd832
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/basic_ts.R
View file @
d3402e19
...
@@ -30,10 +30,11 @@ basic_ts <- function(df,target,group,precision){
...
@@ -30,10 +30,11 @@ basic_ts <- function(df,target,group,precision){
tmp
<-
table
(
unlist
(
tmp
))
tmp
<-
table
(
unlist
(
tmp
))
indice
<-
as.numeric
(
names
(
tmp
[
tmp
==
length
(
group
)]))
indice
<-
as.numeric
(
names
(
tmp
[
tmp
==
length
(
group
)]))
res_ts
[
indice
,
"value"
]
<-
df
[
i
,
target
]
res_ts
[
indice
,
varnames
]
<-
basic
[
i
,
varnames
]
res_ts
[
indice
,
varnames
]
<-
basic
[
i
,
varnames
]
}
}
res_ts
[,
"value"
]
<-
df
[,
target
]
res
<-
friendlyts
::
friendlyts
(
df
=
res_ts
,
date_type
=
"friendlyts"
,
precision
=
precision
)
res
<-
friendlyts
::
friendlyts
(
df
=
res_ts
,
date_type
=
"friendlyts"
,
precision
=
precision
)
class
(
res
)
<-
c
(
"basic_ts"
,
class
(
res
))
class
(
res
)
<-
c
(
"basic_ts"
,
class
(
res
))
return
(
res
)
return
(
res
)
...
...
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