print("Hello from Python!")Hello from Python!
result = 2 + 2
print(f"2 + 2 = {result}")2 + 2 = 4
This document demonstrates how the regurgitate extension handles code execution results.
With show-output-results: true (the default), both code and its output are copied to the appendix.
Let’s do some calculations:
print("Hello from Python!")Hello from Python!
result = 2 + 2
print(f"2 + 2 = {result}")2 + 2 = 4
Some R calculations:
# Create a vector
numbers <- c(1, 2, 3, 4, 5)
print(paste("Sum:", sum(numbers)))[1] "Sum: 15"
print(paste("Mean:", mean(numbers)))[1] "Mean: 3"
plot(numbers)
Notice that in the Code Appendix at the end:
show-output-results: true)To see only code without results in the appendix, set show-output-results: false.
print("Hello from Python!")Hello from Python!
result = 2 + 2
print(f"2 + 2 = {result}")2 + 2 = 4
# Create a vector
numbers <- c(1, 2, 3, 4, 5)
print(paste("Sum:", sum(numbers)))[1] "Sum: 15"
print(paste("Mean:", mean(numbers)))[1] "Mean: 3"
plot(numbers)