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
6d57f049
Commit
6d57f049
authored
Feb 02, 2023
by
pxp9
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pequeña mejora en la sustitucion de Yes/No
parent
3570d2a0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
285 additions
and
280 deletions
+285
-280
ressourceCleaner.R
ressourceCleaner.R
+285
-280
No files found.
ressourceCleaner.R
View file @
6d57f049
...
...
@@ -85,11 +85,15 @@ is_number <- function(x){
replaceNoYesValues
<-
function
(
x
){
#Replace the value with Yes or No
if
(
is.na
(
x
))
if
(
is.na
(
x
))
{
x
<-
""
else
if
(
x
==
0
|
x
==
"No"
|
x
==
" No"
|
x
==
"NO"
)
return
(
x
)
}
x
<-
trimws
(
toupper
(
x
))
if
(
x
==
"0"
|
x
==
"NO"
)
x
<-
"No"
else
if
(
x
==
1
|
x
==
"Yes"
|
x
==
" Yes"
|
x
==
"SI"
)
else
if
(
x
==
"1"
|
x
==
"YES"
|
x
==
"SI"
)
x
<-
"Yes"
else
x
<-
""
...
...
@@ -131,14 +135,15 @@ personalizedFun <- function(x, colname){
}
if
(
colname
==
"SMXFEA"
){
if
(
is.na
(
x
))
x
<-
""
else
if
(
x
==
1
)
x
<-
"Yes"
else
if
(
x
==
0
)
x
<-
"No"
else
if
(
x
==
"."
)
x
<-
""
x
<-
replaceNoYesValues
(
x
)
#if(is.na(x))
# x <- ""
#else if(x == 1)
# x <- "Yes"
#else if (x == 0)
# x <- "No"
#else if (x == ".")
# x <- ""
}
if
(
colname
==
"DMRRETH1"
){
...
...
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