if (FALSE) {
# Scan a directory for workflow annotations
workflow <- put("./src/")
# Scan recursively including subdirectories
workflow <- put("./project/", recursive = TRUE)
# Scan a single file
workflow <- put("./script.R")
# Include line numbers for debugging
workflow <- put("./src/", include_line_numbers = TRUE)
# Single-line PUT annotations (basic syntax):
# #put id:"load_data", label:"Load Dataset", node_type:"input", output:"data.csv"
# #put id:"process", label:"Clean Data", node_type:"process", input:"data.csv", output:"clean.csv"
#
# Multiline PUT annotations (for better code style compliance):
# Use backslash (\) at end of line to continue on next line
# #put id:"complex_process", label:"Complex Data Processing", \
# # input:"file1.csv,file2.csv,file3.csv,file4.csv", \
# # output:"results.csv"
#
# Multiline example with many files:
# #put id:"data_merger", \
# # label:"Merge Multiple Data Sources", \
# # node_type:"process", \
# # input:"sales.csv,customers.csv,products.csv,inventory.csv", \
# # output:"merged_dataset.csv"
#
# All PUT formats support multiline syntax:
# # put id:"style1", label:"Standard" \ # Space after #
# #put| id:"style2", label:"Pipe" \ # Pipe separator
# #put: id:"style3", label:"Colon" \ # Colon separator
}
Run the code above in your browser using DataLab