knitr::opts_chunk$set(echo = TRUE)
Stick to the structure, design choices and style conventions described below. For questions: please contact the author.
[
use: [..., ..., drop = FALSE]
to avoid
accidentally dropping the dim
attributes.Stick to this styleguide with the following exceptions/additions:
processData()
, calculateValue()
.computeValue()
vs. calculateValue()
.
This package always uses calculate
instead of compute
. Similarly, method
vs e.g. approach
. This package always uses approach
instead of method
.scaleWeights()
, calculateComposites()
, handleArgs()
etc. but stick to
singular in other cases like parseModel()
.respect_structural_model
compared to something like resp_sm
. Naming should also be consistent if possible.
For example: any argument that describes a method or an approach should be named
.approach_*
.## Both ok but second is prefered in this case calculateInnerWeightsPLS <- function(.S = NULL, .W = NULL, .csem_model = NULL, .PLS_weight_scheme_inner = c("centroid", "factorial", "path"), .PLS_ignore_structural_model = NULL ) { } calculateInnerWeightsPLS <- function( .S = NULL, .W = NULL, .csem_model = NULL, .PLS_weight_scheme_inner = c("centroid","factorial", "path"), .PLS_ignore_structural_model = NULL ) { }
All arguments used by any of the functions in the package (including internal
functions) are centrally collected in the file zz_arguments.R
.
Whenever a new argument is introduced:
cSEMArguments
list in
alphabetical order by writing @param <argument> "Some description". "Defaults to xxx".
args
or the args_dotdotdot_csem
list of the
args_default()
function and provide a
default value. args_dotdotdot_csem
: all arguments that can be used when
calling csem()
or cca()
. Practically this comprises all formal
arguments of foreman()
that are not formal arguments of csem()
. args
: all other arguments..data
and .model
always come first).
if there is one otherwise use alphabetical order.Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.