mirror of
https://github.com/catppuccin/catppuccin
synced 2024-11-28 22:40:19 +00:00
21 lines
No EOL
452 B
R
21 lines
No EOL
452 B
R
# function declaration
|
||
global_function <- function(regular, named = "Hello World!") {
|
||
# inner function declaration
|
||
inner_function <- function() {
|
||
closure_usage <- regular
|
||
closure_usage + 1
|
||
}
|
||
|
||
print(named)
|
||
regular + inner_function()
|
||
}
|
||
|
||
# function call
|
||
global_function(2, named = 'Hello World!')
|
||
|
||
cat = list(name = "Smudge", breed = "Maine Coon")
|
||
#variable acсess
|
||
print(cat$breed)
|
||
|
||
# namespace access
|
||
print(datasets::cars[1, 2]) |