Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
H
Harmonize_Scripts
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Uncover
Harmonize_Scripts
Commits
e91c65e8
Commit
e91c65e8
authored
Mar 06, 2023
by
Pepe Márquez Romero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
continuas formato
parent
81ad5fcd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
23 deletions
+2
-23
valid_variables_script2.R
valid_variables_script2.R
+2
-23
No files found.
valid_variables_script2.R
View file @
e91c65e8
...
@@ -187,7 +187,8 @@ check_values_format <- function(valid_columns, codebook_param){
...
@@ -187,7 +187,8 @@ check_values_format <- function(valid_columns, codebook_param){
summary
<-
ds.summary
(
paste
(
"inRange$"
,
current_column
,
sep
=
""
))
summary
<-
ds.summary
(
paste
(
"inRange$"
,
current_column
,
sep
=
""
))
if
(
ds.length
(
paste
(
"data$"
,
current_column
,
sep
=
""
))[[
1
]]
>
summary
[[
1
]][[
2
]]){
if
(
ds.length
(
paste
(
"data$"
,
current_column
,
sep
=
""
))[[
1
]]
>
summary
[[
1
]][[
2
]]){
variables_out_of_range
<-
paste
(
variables_out_of_range
,
current_column
,
sep
=
" "
)
variables_out_of_range
<-
paste
(
variables_out_of_range
,
current_column
,
"the range should be:"
,
possible_values
,
sep
=
" "
)
variables_out_of_range
<-
paste
(
variables_out_of_range
,
""
,
sep
=
"\n"
)
print
(
paste
(
current_column
,
"does not follow the established format"
,
sep
=
" "
))
print
(
paste
(
current_column
,
"does not follow the established format"
,
sep
=
" "
))
print
(
paste
(
"It should follow the following format: "
,
possible_values
))
print
(
paste
(
"It should follow the following format: "
,
possible_values
))
}
}
...
@@ -249,28 +250,6 @@ inp <- auxConnections[[2]]
...
@@ -249,28 +250,6 @@ inp <- auxConnections[[2]]
colnames
<-
ds.colnames
(
"data"
)
colnames
<-
ds.colnames
(
"data"
)
colnames
colnames
# ds.dataFrameSubset(df.name = "data",
# V1.name = "data$DMRAGEYR",
# V2.name = "150",
# Boolean.operator = "<=",
# newobj = "inRangeHigh",
# keep.NAs = TRUE,
# datasources = connections)
#
# ds.dataFrameSubset(df.name = "inRangeHigh",
# V1.name = "inRangeHigh$DMRAGEYR",
# V2.name = "0",
# Boolean.operator = ">=",
# newobj = "inRange",
# keep.NAs = TRUE,
# datasources = connections)
#
# summary <- ds.summary("inRange$DMRAGEYR")
# if(ds.length("data$DMRAGEYR")[[1]] > summary[[1]][[2]]){
# res <- c(res, paste(current_column, "does not follow the established format" , sep="\n"))
# }
#----------------------------------------------------------------------------
#----------------------------------------------------------------------------
#Check valid column names
#Check valid column names
...
...
Write
Preview
Markdown
is supported
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