Skip to contents

All functions

check_llm_key()
Check presence of LLM API key
create_cache()
Create a cache environment to store settings for project and system
find_file_with_fallback()
Find a file(s) from a model run with a potential fallback
get_all_results()
helper function to extract all fit results based on vector of model files
get_flag_from_config()
Get a binary value from config, based on path
get_luna_config()
Get luna config, either from global config file, or from project config
get_status()
Get the status of a run
get_table_for_plots()
Get table for basic GOF plots based on run id
get_time_ago()
Get time to now since a given date, in character
get_time_last_updated_file()
Get date/time stamp for last update to file
get_time_last_updated_folder()
Get a timestamp for when the last update was made to any file in a folder Will look only 1 level deep.
get_tools_info()
For a given run, get info on what folders are available for selected Pharmpy or PsN tools
ifelse0()
ifelse function but then based on whether value is NULL or not
insert_entry()
The reverse of pluck_entry, insert_entry() inserts an entry into an unnamded outer list, based on an element in the inner list.
is_luna_cache_available()
Check if luna cache is available / loaded
is_run_as_job()
Checks config if should run as job
log_add()
Add event to log
log_get_last_event()
Get last event from log, as list object
luna
luna package
luna_cache_get()
Get element from active project Just a convenience wrapper with error checking
luna_check()
Syntax-check a NONMEM model
luna_clone()
Clone model
luna_compare()
Compare basic run info for 2 or more model runs
luna_config()
Edit luna config file in editor, e.g. RStudio
luna_dataset()
Get data from a model
luna_diff()
Show a diff between two models
luna_edit()
Edit model in editor, e.g. RStudio
luna_edit_project()
Edit luna config file in editor, e.g. RStudio
luna_gof()
Creates a ggplot2 panel object with basic goodness of fit plots
luna_help()
Ask AI agent to help
luna_ind()
Creates a ggplot2 plot with predictions and observations, split by subject
luna_info()
Show info for a model run
luna_list()
List runs in current project
luna_load_project()
Load a project from yaml and gather results. Project is then stored/updated in .luna_cache
luna_log()
Show a log of events (actions and errors)
luna_new_project()
Create a new project folder with template YAML project file
luna_note()
Annotate a run Either add a note or clear notes from a run
luna_project_templates()
Show available templates
luna_run()
Run a NONMEM model
luna_sync()
Synchronize (re-load) luna project
luna_tables()
Get tables from a model / run
luna_tag()
Add a tag to a run Either add a tag or clear tags from a run
luna_tool()
Run external tools (e.g. diagnostics) on models or run outputs This can be used e.g. for bootstraps and VPCs. The function is implemented in a modular way so that it can be easily extended.
luna_xpose()
Read tables for a model and parse into an Xpose database
new_project_from_template()
Create a new project object based on a predefined template
pluck_entry()
Pluck an inner list element from an unnamed outer list, where an element matches (default name is "id") a specific value. Analogue to _.pluck() in JS/underscore
print(<luna.run_table>)
Prints a list of models / runs in project
read_yaml_safe()
Safe way to read YAML
replace_list_elements()
Replace elements in a list, based on elements in a second list
runs_as_table()
Convert runs in a project object to a data.frame
save_project()
Save a project to a YAML file
truncate_columns()
Apply column width truncation based on console width and relative width specs
update_cache()
Update luna project cache
validate_id()
Validate id