Comment

Comment by Cosi1125

The `6` is the code, I just put the first thing that came to my mind there :D In my example, if you replace it with a more sophisticated code block, R will evaluate it and print out the result of the evaluation.

Typically, you'd want to parse the unevaluated code, though:

    > `if` = function(a, b) { print(substitute(a)); print(substitute(b)) }
    > if (foo) { print("bar") }
    foo
    {
        print("bar")
    }
It overwrites `if`, in the current scope, of course.
parent Cosi1125 1 year ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton