Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cute_little_R_functions
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gael MILLOT
cute_little_R_functions
Commits
1ac97131
Commit
1ac97131
authored
5 years ago
by
Gael MILLOT
Browse files
Options
Downloads
Patches
Plain Diff
fun_trim now deals with NA
parent
24c175e0
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cute_little_R_functions.R
+4
-34
4 additions, 34 deletions
cute_little_R_functions.R
cute_little_R_functions.docx
+0
-0
0 additions, 0 deletions
cute_little_R_functions.docx
with
4 additions
and
34 deletions
cute_little_R_functions.R
+
4
−
34
View file @
1ac97131
...
@@ -5142,9 +5142,9 @@ abline(v = qnorm(trim.cutoffs.f, mean(data.f, na.rm = TRUE), sd(data.f, na.rm =
...
@@ -5142,9 +5142,9 @@ abline(v = qnorm(trim.cutoffs.f, mean(data.f, na.rm = TRUE), sd(data.f, na.rm =
segments(qnorm(trim.cutoffs.f[1], mean(data.f, na.rm = TRUE), sd(data.f, na.rm = TRUE)), par()$usr[4] * 0.75, qnorm(trim.cutoffs.f[2], mean(data.f, na.rm = TRUE), sd(data.f, na.rm = TRUE)), par()$usr[4] * 0.75, col = color.cut.f)
segments(qnorm(trim.cutoffs.f[1], mean(data.f, na.rm = TRUE), sd(data.f, na.rm = TRUE)), par()$usr[4] * 0.75, qnorm(trim.cutoffs.f[2], mean(data.f, na.rm = TRUE), sd(data.f, na.rm = TRUE)), par()$usr[4] * 0.75, col = color.cut.f)
}
}
if(trim.method.f == "quantile"){
if(trim.method.f == "quantile"){
real.trim.cutoffs.f <- quantile(data.f, probs = trim.cutoffs.f, type = 7)
real.trim.cutoffs.f <- quantile(data.f, probs = trim.cutoffs.f, type = 7
, na.rm = TRUE
)
abline(v = quantile(data.f, probs = trim.cutoffs.f, type = 7), col = color.cut.f)
abline(v = quantile(data.f, probs = trim.cutoffs.f, type = 7
, na.rm = TRUE
), col = color.cut.f)
segments(quantile(data.f, probs = trim.cutoffs.f[1], type = 7), par()$usr[4] * 0.75, quantile(data.f, probs = trim.cutoffs.f[2], type = 7), par()$usr[4] * 0.75, col = color.cut.f)
segments(quantile(data.f, probs = trim.cutoffs.f[1], type = 7
, na.rm = TRUE
), par()$usr[4] * 0.75, quantile(data.f, probs = trim.cutoffs.f[2], type = 7
, na.rm = TRUE
), par()$usr[4] * 0.75, col = color.cut.f)
}
}
par(par.ini)
par(par.ini)
if(return.f == TRUE){
if(return.f == TRUE){
...
@@ -5166,7 +5166,7 @@ par.ini <- par()[c("mgp", "xpd")]
...
@@ -5166,7 +5166,7 @@ par.ini <- par()[c("mgp", "xpd")]
par(mgp = c(0.25, 0.25, 0), xpd = NA)
par(mgp = c(0.25, 0.25, 0), xpd = NA)
axis(side = 3, at = c(par()$usr[1], par()$usr[2]), labels = rep("", 2), col = col.quantile.f, lwd.ticks = 0)
axis(side = 3, at = c(par()$usr[1], par()$usr[2]), labels = rep("", 2), col = col.quantile.f, lwd.ticks = 0)
par(xpd = FALSE)
par(xpd = FALSE)
axis(side = 3, at = quantile(as.vector(data.f), probs = quantiles.selection.f, type = 7), labels = quantiles.selection.f, col.axis = col.quantile.f, col = col.quantile.f)
axis(side = 3, at = quantile(as.vector(data.f), probs = quantiles.selection.f, type = 7
, na.rm = TRUE
), labels = quantiles.selection.f, col.axis = col.quantile.f, col = col.quantile.f)
par(mgp = c(1.75, 1.75, 1.5), xpd = NA)
par(mgp = c(1.75, 1.75, 1.5), xpd = NA)
axis(side = 3, at = c(par()$usr[1], par()$usr[2]), labels = rep("", 2), col = col.mean.f, lwd.ticks = 0)
axis(side = 3, at = c(par()$usr[1], par()$usr[2]), labels = rep("", 2), col = col.mean.f, lwd.ticks = 0)
par(xpd = FALSE)
par(xpd = FALSE)
...
@@ -6979,18 +6979,6 @@ return(output) # do not use cat() because the idea is to reuse the message
...
@@ -6979,18 +6979,6 @@ return(output) # do not use cat() because the idea is to reuse the message
# add legend width from scatter. Ok with facet?
# add legend width from scatter. Ok with facet?
# transfert the 2nd tick part to scatter
# transfert the 2nd tick part to scatter
# improve grid -> put secondary grids. Then trasfert to scatter
# improve grid -> put secondary grids. Then trasfert to scatter
...
@@ -8771,17 +8759,6 @@ return(tempo <- output)
...
@@ -8771,17 +8759,6 @@ return(tempo <- output)
# add return.ggplot = FALSE, from boxplot
# add return.ggplot = FALSE, from boxplot
# add facet from boxplot if data1 is a dataframe or list of length 1
# add facet from boxplot if data1 is a dataframe or list of length 1
# error to fix: 1) accept integers as color, 2) fun_scale but xhuld be ok when importing the job from boxplot
# error to fix: 1) accept integers as color, 2) fun_scale but xhuld be ok when importing the job from boxplot
...
@@ -10185,10 +10162,3 @@ return(output)
...
@@ -10185,10 +10162,3 @@ return(output)
This diff is collapsed.
Click to expand it.
cute_little_R_functions.docx
+
0
−
0
View file @
1ac97131
No preview for this file type
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment