pxmake0.19.0 package

Make PX-Files in R

add_cell_to_keyword

Add cell name to keywords that support it (see px-specification)

add_excel_sheet

Add a data frame as a sheet to an Excel workbook

add_language_to_keyword

Add language, other than the main langue, to keyword

add_main_language

Add boolean main_language column

add_sub_key_to_keyword

Add a sub key word (see px-specification for details on sub keys)

add_total_level_to_var

Add total level to variable

add_totals_to_df

Add total levels to multiple variables

aggregation_df

Get data set from aggregation file

align_data_frames

Align data frames

break_long_lines

Split long strings at commas

change_pivot_variables

Change pivot variables

classification_file_section_heading_regexp

Regexp that matches a classification file section heading

convert_df_to_code

Create code to construct data frame

convert_value_to_code

Create constructing code

create_dummy_tibbles

Create a tibble with dummy values

defined_languages

Get languages used in px object

download_px_or_parquet_and_return_path

Download parquet or PX-file and return path

drop_blank_rows

Drop rows with only NA values

enumerate_lines

Add lines numbers

error_if_agument_is_not_character_string

Throw error if argument is not a character string

error

Throw error

extract_section

Get section in .vs or .agg file

fix_px

Fix some common issues in px objects

format_data_df

Format df for px format

format_px_object_as_lines

Get lines for PX-file from px object

format_time_values

Format time values for PX-file

get_data_cube

Get data cube used in PX-file format

get_data_table

Return data table from px object

get_default_encoding

Default encoding to read and save PX-file in

get_encoding_from_px_file

Get encoding listed in PX-file

get_excel_sheet

Get specific sheet from Excel workbook

get_figures_variable_from_excel

Get figures variable from Excel workbook

get_main_language

Get the main language from metadata

get_mandatory_variables

A list of which variables should be in each sheet

get_metadata_df_from_px_lines

Get metadata df from px lines

get_metadata_df_from_px

Get metadata df from px object

get_pivot_variables

Get names of pivot variables

get_px_metadata_regex

Regular expression to parse header in PX-file

get_section

Return lines in section

get_timeval_type_from_values

Get time scale code from values (see TIMEVAL in px-specification)

get_values_from_time_format

Get time values from TIMEVAL string

get_variable_label

Get variable code and label

guess_file_encoding

Guess encoding of file

is_path_extension

Check if a path has a specific extension (function factory)

lst_distinct_and_arrange

Get a sorted list of distinct values in list

merge_named_lists

Put two named lists together, remove duplicates and sort

modify_languages_in_px

Change language in px object

modify_languages_in_table

Change language in table

modify_or_add_row

Add or modify value

mutate_all_vars_to_character

Change all variables to character

new_classification

Create new classification object

new_px

Create new px object

px_add_totals.px

Add total levels to variables

px_aggregallowed.px

AGGREGALLOWED

px_autopen.px

AUTOPEN

px_axis_version.px

AXIS-VERSION

px_baseperiod.px

BASEPERIOD

px_cellnote.px

CELLNOTE

px_cellnotex.px

CELLNOTEX

px_cfprices.px

CFPRICES

px_charset.px

CHARSET

px_classification_from_df

px classification from data frame

px_classification_from_path

px classification from path

px_classification

Create a classification object

px_codepage.px

CODEPAGE

px_confidential.px

CONFIDENTIAL

px_contact.px

CONTACT

px_contents.px

CONTENTS

px_contvariable.px

CONTVARIABLE

px_copyright.px

COPYRIGHT

px_creation_date.px

CREATION-DATE

px_data.px

DATA

px_decimals.px

DECIMALS

px_description.px

DESCRIPTION

px_descriptiondefault.px

DESCRIPTIONDEFAULT

px_domain.px

DOMAIN

px_elimination.px

ELIMINATION

px_figures.px

Change figures variable

px_from_data_df

Create a minimal px object from a data frame

px_from_excel

Create a px object from an Excel workbook

px_from_px_file

Create a px object form a PX-file

px_heading.px

HEADING

px_infofile.px

INFOFILE

px_language.px

LANGUAGE

px_languages.px

LANGUAGES

px_last_updated.px

LAST-UPDATED

px_link.px

LINK

px_map.px

MAP

px_matrix.px

MATRIX

px_micro

Create micro PX-files

px_next_update.px

NEXT-UPDATE

px_note.px

NOTE

px_notex.px

NOTEX

px_official_statistics.px

OFFICIAL-STATISTICS

px_order.px

Change value order

px_precision.px

PRECISION

px_save_classification

Save classification as .vs and .agg files

px_save

Save px object to file

px_showdecimals.px

SHOWDECIMALS

px_source.px

SOURCE

px_stockfa.px

STOCKFA

px_stub.px

STUB

px_subject_area.px

SUBJECT-AREA

px_subject_code.px

SUBJECT-CODE

px_tableid.px

TABLEID

px_timeval.px

TIMEVAL

px_title.px

TITLE

px_units.px

UNITS

px_update_frequency.px

UPDATE-FREQUENCY

px_validate

Check px object

px_valuenote.px

VALUENOTE

px_valuenotex.px

VALUENOTEX

px_values.px

VALUES

px_variable_label.px

Change VARIABLE-LABEL

px_variable_type.px

VARIABLE-TYPE

px

Create a px object

pxmake-package

pxmake: Make PX-Files in R

quote_unless_yes_no

Add quotes around unless in some very specific cases required by the p...

read_px_file

Get PX-file content as lines

readLines_guess_encoding

Read lines from file with guessed encoding

readLines_with_encoding

Read lines with specific encoding

replace_na_language_with_main_language

Impute missing language

return_px

Return px object

save_px_as_px_file

Save px object to PX-file

save_px_as_r_script

Save px object as an R script

save_px_as_xlsx

Save px object as an Excel workbook

section_interval

Get index of first and last line of section

smallest_larger_value

Smallest larger value

sort_data_table_by_order

Sort data table by order

sort_metadata_df

Sort metadata data frame

str_quote

Add quotes around string

temp_dir

Create and return path to temporary directory

temp_file_with_extension

Create temporary file

update_data_table

Add value as data table in x

validate_px_arguments

Check all arguments to px()

validate_px_classification_arguments

Check all arguments to px_classification

validate_px_data_arguments

Check all arguments to px_data

validate_px_micro_arguments

Check all arguments to px_micro()

validate_px_save_arguments

Check all arguments to px_save()

wrap_varaible_in_list

Convert a variable to a list

write_aggregation

Save classification as .agg file

write_value_set

Save classification as .vs file

zip_vectors

Zips list

Create PX-files from scratch or read and modify existing ones. Includes a function for every PX keyword, making metadata manipulation simple and human-readable.

  • Maintainer: Johan Ejstrud
  • License: MIT + file LICENSE
  • Last published: 2025-12-16