Skip to content
Snippets Groups Projects
Commit dacae404 authored by Gael  MILLOT's avatar Gael MILLOT
Browse files

tempo saving

parent a8f84838
No related branches found
No related tags found
No related merge requests found
#### DESCRIPTION #### DESCRIPTION
Cute Little R Functions contains 32 functions for R/RStudio that facilitate basic procedures in 1) object analysis, 2) object modification, 3) graphic handling and 4) log file management. Cute Little R Functions contains 33 functions for R/RStudio that facilitate basic procedures in 1) object analysis, 2) object modification, 3) graphic handling and 4) log file management.
The function names are: The function names are:
## Object analysis ## Object analysis
fun_param_check() #### Checking class, type, length, etc. of objects fun_param_check() #### checking class, type, length, etc. of objects
fun_object_info() #### Recovering object information fun_object_info() #### recovering object information
fun_1D_comp() #### comparison of two 1D datasets (vectors, factors, 1D tables) fun_1D_comp() #### comparison of two 1D datasets (vectors, factors, 1D tables)
fun_2D_comp() #### comparison of two 2D datasets (row & col names, dimensions, etc.) fun_2D_comp() #### comparison of two 2D datasets (row & col names, dimensions, etc.)
fun_2D_head() #### head of the left or right of big 2D objects fun_2D_head() #### head of the left or right of big 2D objects
...@@ -17,6 +17,7 @@ fun_list_comp() #### comparison of two lists ...@@ -17,6 +17,7 @@ fun_list_comp() #### comparison of two lists
## Object modification ## Object modification
fun_name_change() #### check a vector of character strings and modify any string if present in another vector
fun_dataframe_remodeling() #### remodeling a data frame to have column name as a qualitative column and vice-versa fun_dataframe_remodeling() #### remodeling a data frame to have column name as a qualitative column and vice-versa
fun_refactorization() #### remove classes that are not anymore present in factors or factor columns in data frames fun_refactorization() #### remove classes that are not anymore present in factors or factor columns in data frames
fun_round() #### Rounding number if decimal present fun_round() #### Rounding number if decimal present
...@@ -31,10 +32,10 @@ fun_consec_pos_perm() #### progressively breaks a vector order ...@@ -31,10 +32,10 @@ fun_consec_pos_perm() #### progressively breaks a vector order
## Graphics management ## Graphics management
fun_window_width_resizing() #### window width depending on classes to plot fun_window_width_resizing() #### window width depending on classes to plot
fun_open_window() #### Open a GUI or pdf graphic window fun_open_window() #### open a GUI or pdf graphic window
fun_prior_plot() #### Graph param before plotting fun_prior_plot() #### graph param before plotting
fun_post_plot() #### Graph param after plotting fun_post_plot() #### graph param after plotting
fun_close_specif_window() #### Closing specific graphic windows fun_close_specif_window() #### closing specific graphic windows
## Standard graphics ## Standard graphics
...@@ -53,19 +54,19 @@ fun_gg_empty_graph() #### text to display for empty graphs ...@@ -53,19 +54,19 @@ fun_gg_empty_graph() #### text to display for empty graphs
## Graphic extraction ## Graphic extraction
fun_var_trim_display() #### Display values from a quantitative variable and trim according to defined cut-offs fun_var_trim_display() #### display values from a quantitative variable and trim according to defined cut-offs
fun_segmentation() #### Segment a dot cloud on a scatterplot and define the dots from another cloud outside the segmentation fun_segmentation() #### segment a dot cloud on a scatterplot and define the dots from another cloud outside the segmentation
## Import ## Import
fun_pack_import() #### Check if R packages are present and import into the working environment fun_pack_import() #### check if R packages are present and import into the working environment
fun_python_pack_import() #### Check if python packages are present fun_python_pack_import() #### check if python packages are present
## Exporting results (text & tables) ## Exporting results (text & tables)
fun_export_data() #### Print string or data object into output file fun_export_data() #### print string or data object into output file
...@@ -118,6 +119,7 @@ fun_graph_param_prior_plot() fun_prior_plot() ...@@ -118,6 +119,7 @@ fun_graph_param_prior_plot() fun_prior_plot()
fun_feature_post_plot() fun_post_plot() fun_feature_post_plot() fun_post_plot()
2) new functions added: 2) new functions added:
fun_name_change()
fun_mat_fill() fun_mat_fill()
fun_consec_pos_perm() fun_consec_pos_perm()
fun_empty_graph() fun_empty_graph()
......
This diff is collapsed.
No preview for this file type
...@@ -64,6 +64,13 @@ obs1 = list(b = 1:5, c = LETTERS[1:2]) ; obs2 = list(LETTERS[5:9], matrix(1:6), ...@@ -64,6 +64,13 @@ obs1 = list(b = 1:5, c = LETTERS[1:2]) ; obs2 = list(LETTERS[5:9], matrix(1:6),
######## fun_name_change()
obs1 <- c("A", "B", "C", "D") ; obs2 <- c("A", "C") ; fun_change_name(obs1, obs2)
obs1 <- c("A", "B", "C", "C_modif1", "D") ; obs2 <- c("A", "A_modif1", "C") ; fun_change_name(obs1, obs2) # the function checks that the new names are neither in obs1 nor in obs2 (increment the number after the added string)
######## fun_dataframe_remodeling() ######## fun_dataframe_remodeling()
obs <- data.frame(col1 = (1:4)*10, col2 = c("A", "B", "A", "A")) ; obs ; fun_dataframe_remodeling(obs) obs <- data.frame(col1 = (1:4)*10, col2 = c("A", "B", "A", "A")) ; obs ; fun_dataframe_remodeling(obs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment