Man pages for krlmlr/styler
Non-Invasive Pretty Printing of R Code

add_cache_blockAdd the block id to a parse table
add_id_and_shortAdd column 'pos_id' and 'short'
add_roxygen_maskAdd the roxygen mask to code
add_spaces_or_newlinesConcentrate newlines or spaces in a string
add_stylerignoreAdds the stylerignore column
add_token_terminalAdd information about previous / next token to each terminal
alignment_col1_all_namedChecks if all arguments of column 1 are named
alignment_drop_commentsRemove all comment tokens
alignment_drop_last_exprRemove last expression
alignment_ensure_no_closing_braceEnsure the closing brace of the call is removed
alignment_ensure_trailing_commaEnsure last pd has a trailing comma
alignment_has_correct_spacing_around_commaCheck if spacing around comma is correct
alignment_has_correct_spacing_around_eq_subCheck if spacing around '=' is correct
alignment_serializeSerialize text from a parse table
alignment_serialize_columnSerialize all lines for a given column
alignment_serialize_lineSerialize one line for a column
apply_ref_indentionApply reference indention to tokens
apply_ref_indention_oneApplying reference indention of a target token
apply_stylerignoreEnsure correct positional information for stylerignore...
apply_transformersApply transformers to a parse table
assert_filetypeMake sure all supplied file types are allowed
assert_textAssert text to be of positive length and replace it with the...
assert_tokensCheck token validity
assert_transformersAssert the transformers
bind_with_childBind a parse table with one of its children
cache_activateActivate or deactivate the styler cache
cache_by_expressionCache text
cache_clearClear the cache
cache_find_blockFind the groups of expressions that should be processed...
cache_find_pathWhere is the cache?
cache_infoShow information about the styler cache
cache_is_activatedCheck if a cache is activated
cache_make_keyMake a key for 'R.cache'
cache_more_specsCreate more specs
cache_writeWrite to the cache
cachingRemember the past to be quicker in the future
catch_style_file_outputCapture and post-process the output of 'style_file' without...
choose_indentionChoose the indention method for the tokens
combine_childrenCombine child and internal child
communicate_summaryCommunicate the summary of styling
communicate_warningCommunicate a warning if necessary
compute_indent_indicesCompute the indices that need indention
compute_parse_data_nestedObtain a nested parse table from a character vector
construct_outConstruct *-out.R from a *-in.R
construct_treeConstruct paths of a tree object given the paths of *-in.R...
construct_verticalConstruct an object of class vertical
contains_else_expr_that_needs_bracesCheck whether an else expression needs braces
context_to_terminalsPropagate context to terminals
context_towards_terminalsUpdate the a parse table given outer context
convert_newlines_to_linebreaksReplace the newline character with a line break
copy_to_tempdirCopy a file to a temporary directory
create_node_from_nestedCreate node from nested parse data
create_node_from_nested_rootConvert a nested data frame into a node tree
create_pos_idsCreate valid pos_ids if possible
create_style_guideCreate a style guide
create_tokensCreate a terminal token
create_treeCreate a tree from text
default_style_guide_attributesInitialize default style guide attributes
delete_if_cache_directoryDelete a cache or temp directory
dir_without_.'dir()', but without dot-prefix and different defaults
dir_without_._one'dir()', but with full names, ignored case, and included...
emulate_rdConvert roxygen comments to Rd code
enhance_mapping_specialEnhance the mapping of text to the token "SPECIAL"
enrich_terminalsEnrich flattened parse table
ensure_correct_txtEnsure a correct 'text' of all strings and numeric constants
ensure_last_n_emptyEnsure there is one (and only one) blank line at the end of a...
env_add_stylerignoreAdd positional information of token to next terminal
env_currentThe elements that are added to this environment are:
expressions_are_identicalCheck whether two expressions are identical
extract_terminalsExtract terminal tokens
finalize_raw_chunksDrop start / stop, when formatting is turned off
find_blank_lines_to_next_blockNumber of lines between cache blocks
find_blank_lines_to_next_exprFind blank lines
find_dont_seqsFind 'dontrun' and friend sequences
find_line_break_position_in_multiline_callFind index of the token before which the line should be...
find_pos_id_to_keepFind the pos ids to keep
find_start_pos_idFind legit starting value for a new positional id
find_tokens_to_updateFind the tokens to update when applying a reference indention
fix_quotesReplace single quotes with double quotes
flatten_operatorsFlatten some token in the nested parse table based on...
flatten_operators_oneFlatten one level of nesting with its child
flatten_pdFlatten a parse table
get_addins_style_transformer_nameReturn the style function or name
get_engine_patternWhat's the engine pattern for rmd code chunks?
get_knitr_patternGet chunk pattern
get_parse_dataObtain robust parse data
has_crlf_as_first_line_sepCheck if a string uses CRLF EOLs
hash_standardizeStandardize text for hashing
identify_raw_chunksIdentifies raw Rmd or Rnw code chunks
identify_start_to_stop_of_roxygen_examples_from_textFigure out where code examples start and stop
if_for_while_part_requires_bracesCheck if if, for or while loop expression require a braces.
initialize_attributesInitialize attributes
invalid_utf8Drop-in replacement for 'xfun:::invalid_utf8()'
is_cachedCheck if text is cached
is_code_chunk_header_or_xaringan_or_code_outputIdentify spinning code chunk header or xaringan
is_insufficiently_parsed_stringIdentify strings that were not fully parsed
is_shebangIdentify comments that are shebangs
is_single_indent_function_declarationIs the function declaration single indented?
local_test_setupEstablish testing setup for current environment
lookup_new_specialLookup which new tokens were created from "SPECIAL"
lookup_tokensLookup all tokens that have a unique token-text mapping
make_transformerClosure to return a transformer function
map_filetype_to_patternMap the file type to a corresponding regular expression
match_stop_to_startMatch a stop candidate to a start
math_token_spacingSpecify spacing around math tokens
needs_indentionCheck whether indention is needed
needs_indention_oneCheck whether indention is needed
needs_rd_emulationCheck if rd emulation is required with...
nest_parse_dataNest a flat parse table
next_non_commentFind the index of the next or previous non-comment in a parse...
next_terminalTell me what the next terminal is
n_times_faster_with_cacheTimes two function calls with temporarily enabled cache
option_readGet the value of an option
parse_roxygenParse roxygen comments into text
parser_version_setWork with parser versions
parse_safelySave parsing from text
parse_transform_serialize_rParse, transform and serialize text
parse_transform_serialize_r_blockParse, transform and serialize a nested parse table
parse_transform_serialize_roxygenParse, transform and serialize roxygen comments
parse_tree_must_be_identicalCheck whether a round trip verification can be carried out
pd_isWhat is a parse table representing?
pd_is_multi_lineCheck whether a parse table is a multi-line token
post_parse_roxygenChanging the line definition
prettify_anyPrettify R code in current working directory
prettify_pkgPrettify a package
print.verticalPrint styled code
read_utf8Read UTF-8
read_utf8_bareDrop-in replacement for 'xfun::read_utf8()', with an optional...
reindentionSpecify what is re-indented how
remove_dont_maskRemove dont* mask
remove_roxygen_headerRemove roxygen header
rep_charRepeat elements of a character vector 'times' times and...
roxygen_remove_extra_braceFix 'tools::parse_Rd()' output
save_after_styling_is_activeHeuristic to see if a file styled with the addin should be...
scope_normalizeConvert the styling scope to its lower-level representation
separate_chunksSeparate chunks within Rmd and Rnw contents
serialize_parse_data_flattenedSerialize flattened parse data
set_and_assert_arg_filetypeSet the file type argument
set_arg_pathsStandardize paths in root
set_line_break_after_opening_if_call_is_multi_lineSets line break after opening parenthesis
set_line_break_around_curly_curlyStyling around \{\{
set_line_break_before_curly_openingSet line break before a curly brace
set_line_break_if_call_is_multi_lineSet line break for multi-line function calls
set_multi_lineSet the multi-line column
set_regex_indentionSet indention of tokens that match regex
set_space_around_operatorSet spaces around operators
set_space_between_eq_sub_and_commaSet space between 'EQ_SUB' and '"','"'
set_space_between_levelsSet space between levels of nesting
set_spacesHelper for setting spaces
set_style_transformersAsks the user to supply a style
set_unindention_childUnindent a child if necessary
shallowifyShallowify the parse table
specify_transformers_dropSpecify which tokens must be absent for a transformer to be...
split_roxygen_segmentsSplit text into roxygen and non-roxygen example segments
start_comments_with_spaceStart comments with a space
style_active_pkgWrapper around 'style_pkg()' for access via Addin.
style_dirPrettify arbitrary R code
style_fileStyle files with R source code
style_guidesStyle guides
style_pkgPrettify R source code
styler_addinsStylers for RStudio Addins
stylerignoreTurn off styling for parts of the code
stylerignore_consolidate_colConsolidate columns after a merge
styler_optionsPackage options
style_roxygen_code_exampleStyle a roxygen code example that may contain dontrun and...
style_roxygen_code_example_oneStyle a roxygen code example with exactly one @example or...
style_roxygen_code_example_segmentStyle a roxygen code example segment
style_roxygen_example_snippetGiven a code snippet is dont* or run, style it
styler-packagestyler: Non-Invasive Pretty Printing of R Code
style_selectionStyles the highlighted selection in a '.R' or '.Rmd' file.
style_space_around_math_tokenStyle spacing around math tokens
style_space_around_tokenSet spacing of token to a certain level
style_textStyle a string
style_text_without_curly_curly'style_text()' without rules for \{\{
test_collectionRun a collection of tests
test_dryTest the dry argument
testthat_fileCreate the path to a test that file
test_transformerTransforming test input with a transformer function
test_transformers_dropTest 'transformers_drop' for consistency
text_to_flat_pdCreates a flat parse table with minimal initialization
tidyverse_styleThe tidyverse style
token_is_on_aligned_lineCheck if tokens are aligned
tokenizeObtain token table from text
transform_and_checkTransform a file an check the result
transform_codeTransform code from R, Rmd or Rnw files
transformers_dropRemove transformers that are not needed
transform_fileTransform a file and output a customized message
transform_filesTransform files with transformer functions
transform_mixedTransform mixed contents
transform_mixed_non_emptyEnsure for '.Rmd' and friends that a code chunk without code...
transform_utf8Apply a function to the contents of a file
transform_utf8_onePotentially transform a file
try_transform_as_r_fileStyle a file as if it was an .R file
unindent_childUnindent a child
unindent_function_declarationRevert the indention of function declaration header
update_indentionUpdate indention information of parse data
update_indention_refUpdate the indention reference
update_newlinesUpdate the newlines attribute
validate_new_pos_idsValidate sequence of new position ids
verify_roundtripVerify the styling
visitVisit'em all
visit_oneTransform a flat parse table with a list of transformers
wrap_else_multiline_curlyAdd curly braces to else
wrap_expr_in_curlyWrap an expression in curly braces
wrap_expr_in_exprWrap an expression into an expression
wrap_if_else_while_for_function_multi_line_in_curlyWrap if-else, while and for statements in curly braces
wrap_multiline_curlyWrap a multi-line statement in curly braces
wrap_subexpr_in_curlyWrap a sub-expression in curly braces
write_utf8Drop-in replacement for 'xfun::write_utf8()'
krlmlr/styler documentation built on Dec. 12, 2024, 8:36 a.m.