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
Gael MILLOT
cute_little_R_functions
Commits
c3714078
Commit
c3714078
authored
Oct 08, 2021
by
Gael
Browse files
v10.8.1 release
parent
eb9a793d
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
c3714078
...
...
@@ -170,6 +170,13 @@ Gitlab developers
## WHAT'S NEW IN
### v10.8.1
1) fun_check() and fun_info() readded for pratical purposes but must not be changed. See the cute package for that
2) cute.path parameter improved for fun.test() and fun.slide()
### v10.8.0
1) fun_check() and fun_info() removed from this repo and transferred into the cute package
...
...
check/Function check-list.docx
0 → 100644
View file @
c3714078
File added
dev
/TODO.txt
→
check
/TODO.txt
View file @
c3714078
...
...
@@ -29,6 +29,14 @@ A voir ce qui plait à qui.
A demain
20210301
L'investissement dans le projet Cute:
1) Terminer les pages d'exemple de chaque fonction (c'est long)
...
...
@@ -49,3 +57,22 @@ Merci beaucoup.
Gael.
For Corinne :
Corinne
1) first capital
all the section present
Argument and return : leave it to me
3) Corinne add all the comments of the missing sections and put it into the function but I have to complete it
5) I have to do it
7) I have to do it: create a nice file
For packages :
See mails with cuteathon
check/check_fun_comp_1d.R
0 → 100644
View file @
c3714078
######## fun_check() #### check class, type, length, etc., of objects
# 20201216 checking each argument separately, with default values for the others
load
(
"C:/Users/gael/Documents/Git_projects/cute_little_R_functions/check/check_dataset.t25_20201108.RData"
)
# recover the test list tl file
source
(
"https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/7ceacbc07ba1cc65b3dd8db53ef0d8db2a2823d7/cute_little_R_functions.R"
)
# performed with check_dataset.RData commited 20201107 (25 different objects)
# in green the values that are not the default values
path
<-
"C:\\Users\\Gael\\Desktop\\fun_check_test1\\"
for
(
i0
in
1
:
2
){
Sys.sleep
(
1
)
cat
(
"\n\nLOOP "
,
i0
,
" / 2\n\n"
)
res
<-
fun_test
(
fun
=
"fun_comp_1d"
,
arg
=
c
(
L1
=
"data1"
,
L2
=
"data2"
),
val
=
list
(
L1
=
if
(
i0
==
1
){
t25_20201108
}
else
{
"a"
},
L2
=
if
(
i0
==
2
){
t25_20201108
}
else
{
"a"
},
),
thread.nb
=
NULL
,
plot.fun
=
FALSE
,
export
=
TRUE
,
res.path
=
path
)
}
file.list
<-
list.files
(
path
,
full.names
=
TRUE
)
tempo.df
<-
NULL
for
(
i0
in
1
:
length
(
file.list
)){
tempo.df
<-
rbind
(
tempo.df
,
cbind
(
loop
=
paste0
(
"loop_"
,
i0
),
read.table
(
list.files
(
file.list
[
i0
],
,
full.names
=
TRUE
)[
grepl
(
x
=
list.files
(
file.list
[
i0
]),
pattern
=
"^table_from_fun_test.*"
)],
header
=
TRUE
,
sep
=
"\t"
,
comment.char
=
""
)))
}
write.table
(
tempo.df
,
file
=
paste0
(
path
,
"/final_table_from_fun_test.txt"
),
row.names
=
FALSE
,
col.names
=
TRUE
,
append
=
FALSE
,
quote
=
FALSE
,
sep
=
"\t"
,
eol
=
"\n"
,
na
=
""
)
# 20201216 checking all the possible values of each argument, with default values for the others
load
(
"C:/Users/gael/Documents/Git_projects/cute_little_R_functions/other/check_dataset.t26_20201124.RData"
)
# recover the test list tl file
load
(
"C:/Users/gael/Documents/Git_projects/cute_little_R_functions/other/check_dataset.t8_20201126.RData"
)
# recover the test list tl file
source
(
"https://gitlab.pasteur.fr/gmillot/cute_little_R_functions/-/raw/7ceacbc07ba1cc65b3dd8db53ef0d8db2a2823d7/cute_little_R_functions.R"
)
# performed with check_dataset.RData commited 20201107 (25 different objects)
# in green the values that are not the default values
path
<-
"C:\\Users\\Gael\\Desktop\\fun_check_test2\\"
for
(
i0
in
1
:
14
){
Sys.sleep
(
1
)
cat
(
"\n\nLOOP "
,
i0
,
" / 14\n\n"
)
res
<-
fun_test
(
fun
=
"fun_check"
,
arg
=
c
(
L1
=
"data"
,
L2
=
"class"
,
L3
=
"typeof"
,
L4
=
"mode"
,
L5
=
"length"
,
L6
=
"prop"
,
L7
=
"double.as.integer.allowed"
,
L8
=
"options"
,
L9
=
"all.options.in.data"
,
L10
=
"na.contain"
,
L11
=
"neg.values"
,
L12
=
"print"
,
L13
=
"data.name"
,
L14
=
"fun.name"
),
val
=
list
(
L1
=
if
(
i0
==
1
){
t26_20201124
}
else
{
"a"
},
L2
=
if
(
i0
==
2
){
list
(
NULL
,
"vector"
,
"logical"
,
"integer"
,
"numeric"
,
"complex"
,
"character"
,
"matrix"
,
"array"
,
"data.frame"
,
"list"
,
"factor"
,
"table"
,
"expression"
,
"name"
,
"symbol"
,
"function"
,
"uneval"
,
"environment"
,
"ggplot2"
,
"ggplot_built"
,
"call"
)}
else
if
(
i0
==
8
){
list
(
NULL
)}
else
{
"vector"
},
L3
=
if
(
i0
==
3
){
list
(
NULL
,
"logical"
,
"integer"
,
"double"
,
"complex"
,
"character"
,
"list"
,
"expression"
,
"symbol"
,
"closure"
,
"special"
,
"builtin"
,
"environment"
,
"S4"
,
"language"
)}
else
{
list
(
NULL
)},
L4
=
if
(
i0
==
4
){
list
(
NULL
,
"logical"
,
"numeric"
,
"complex"
,
"character"
,
"list"
,
"expression"
,
"name"
,
"symbol"
,
"function"
,
"environment"
,
"S4"
,
"call"
)}
else
{
list
(
NULL
)},
L5
=
if
(
i0
==
5
){
list
(
NULL
,
0
,
2
,
4
)}
else
{
list
(
NULL
)},
L6
=
if
(
i0
==
6
){
logic1
}
else
{
FALSE
},
L7
=
if
(
i0
==
7
){
logic1
}
else
{
FALSE
},
L8
=
if
(
i0
==
8
){
list
(
NULL
,
"a"
)}
else
{
list
(
NULL
)},
L9
=
if
(
i0
==
9
){
logic1
}
else
{
FALSE
},
L10
=
if
(
i0
==
10
){
logic1
}
else
{
FALSE
},
L11
=
if
(
i0
==
11
){
logic1
}
else
{
TRUE
},
L12
=
if
(
i0
==
12
){
logic1
}
else
{
TRUE
},
L13
=
if
(
i0
==
13
){
list
(
NULL
,
"test.function"
)}
else
{
list
(
NULL
)},
L14
=
if
(
i0
==
14
){
list
(
NULL
,
"FUN_NAME"
)}
else
{
list
(
NULL
)}
),
thread.nb
=
NULL
,
plot.fun
=
FALSE
,
export
=
TRUE
,
res.path
=
path
)
}
file.list
<-
list.files
(
path
,
full.names
=
TRUE
)
tempo.df
<-
NULL
for
(
i0
in
1
:
length
(
file.list
)){
tempo.df
<-
rbind
(
tempo.df
,
cbind
(
loop
=
paste0
(
"loop_"
,
i0
),
read.table
(
list.files
(
file.list
[
i0
],
,
full.names
=
TRUE
)[
grepl
(
x
=
list.files
(
file.list
[
i0
]),
pattern
=
"^table_from_fun_test.*"
)],
header
=
TRUE
,
sep
=
"\t"
,
comment.char
=
""
)))
}
write.table
(
tempo.df
,
file
=
paste0
(
path
,
"/final_table_from_fun_test.txt"
),
row.names
=
FALSE
,
col.names
=
TRUE
,
append
=
FALSE
,
quote
=
FALSE
,
sep
=
"\t"
,
eol
=
"\n"
,
na
=
""
)
cute_little_R_functions.R
View file @
c3714078
This diff is collapsed.
Click to expand it.
cute_little_R_functions.docx
View file @
c3714078
No preview for this file type
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