Skip to content

Commit

Permalink
ajout de la fonction noyau_skeleton()
Browse files Browse the repository at this point in the history
  • Loading branch information
GuillaumePressiat committed Jul 24, 2017
1 parent f6cdcfa commit 530839a
Show file tree
Hide file tree
Showing 48 changed files with 553 additions and 198 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export(issrha)
export(itra)
export(labeleasier)
export(noyau_pmeasyr)
export(noyau_skeleton)
export(tdiag)
exportClasses(pm_param)
import(forcats)
Expand Down
51 changes: 50 additions & 1 deletion R/main_before_utf.R
Original file line number Diff line number Diff line change
Expand Up @@ -5638,7 +5638,7 @@ NULL
#' p
#' print(p)
#' }
#'
#' @seealso \code{\link{noyau_skeleton}}
#' @export
noyau_pmeasyr <- function(...){
params <- list(...)
Expand All @@ -5662,6 +5662,55 @@ print.pm_param <- function(p){

}

#' ~ par - Noyau de parametres
#'
#' Générer un squelette de noyau de paramètres
#'
#' Voir exemple
#'
#' @author G. Pressiat
#'
#' @examples
#' \dontrun{
#'
#' noyau_skeleton()
#' ## résultat :
#' ## noyau_pmeasyr(
#' ## finess = '.........',
#' ## annee = ....,
#' ## mois = ..,
#' ## path = ''
#' ## ) -> p
#'
#' noyau_skeleton("alpha_bravo", T)
#'
#' ## noyau_pmeasyr(
#' ## finess = '.........',
#' ## annee = ....,
#' ## mois = ..,
#' ## path = ''
#' ## ) -> alpha_bravo
#' ##
#' ## # adezip(alpha_bravo, type = 'out')
#' ## # adezip(alpha_bravo, type = 'in')
#'
#' }
#'
#' @seealso \code{\link{noyau_pmeasyr}}
#' @export
noyau_skeleton <- function(nom = "p", zip = F){
cat(paste0("\nnoyau_pmeasyr(
finess = \'.........\',
annee = ....,
mois = ..,
path = \'\'
) -> ", nom, "\n\n"))

if (zip){
cat(paste0("# adezip(", nom, ", type = \'out\')\n# adezip(", nom, ", type = \'in\')"))
}
}

##############################################
####################### LABELS ###############
##############################################
Expand Down
2 changes: 2 additions & 0 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ reference:
- title: Noyau de paramètres
contents:
- noyau_pmeasyr
- noyau_skeleton
- title: Autres
contents:
- tdiag
- dico

navbar:
title: pmeasyr
Expand Down
2 changes: 1 addition & 1 deletion docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions docs/articles/vignette.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion docs/pkgdown.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,14 @@ pre, code {
color: #333;
}

pre img {
pre .img {
margin: 5px 0;
}

pre .img img {
background-color: #fff;
display: block;
height: auto;
}

code a, pre a {
Expand Down
37 changes: 37 additions & 0 deletions docs/pkgdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,41 @@ $(function() {
offset: 60
});

var cur_path = paths(location.pathname);
$("#navbar ul li a").each(function(index, value) {
if (value.text == "Home")
return;
if (value.getAttribute("href") === "#")
return;

var path = paths(value.pathname);
if (is_prefix(cur_path, path)) {
// Add class to parent <li>, and enclosing <li> if in dropdown
var menu_anchor = $(value);
menu_anchor.parent().addClass("active");
menu_anchor.closest("li.dropdown").addClass("active");
}
});
});

function paths(pathname) {
var pieces = pathname.split("/");
pieces.shift(); // always starts with /

var end = pieces[pieces.length - 1];
if (end === "index.html" || end === "")
pieces.pop();
return(pieces);
}

function is_prefix(needle, haystack) {
if (needle.length > haystack.lengh)
return(false);

for (var i = 0; i < haystack.length; i++) {
if (needle[i] != haystack[i])
return(false);
}

return(true);
}
7 changes: 6 additions & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
reference_url: https://im-aphp.github.io/pmeasyr//reference
urls:
reference: https://im-aphp.github.io/pmeasyr//reference
article: https://im-aphp.github.io/pmeasyr//articles
articles:
vignette2: vignette2.html
vignette: vignette.html

9 changes: 5 additions & 4 deletions docs/reference/adelete.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 18 additions & 17 deletions docs/reference/adezip.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 12 additions & 11 deletions docs/reference/adezip2.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 530839a

Please sign in to comment.