bquote()
function in R Language is used to quote the arguments passed to it, except the values which are wrapped in ‘.()‘. It evaluates the wrapped values and quotes the result.
Syntax: bquote(expr)
Parameters:
expr: language object
Example 1:
x < - 10
bquote(x = = x)
bquote(x = = 10 )
bquote(x = = .(x))
bquote(x = = .(x * 2 ))
|
Output:
x == x
x == 10
x == 10
x == 20
Example 2:
z < - 10
bquote(function(x, y = .(z)) x + y)
plot( 1 : 10 , z + ( 1 : 10 ), main = bquote(z = = .(z)))
|
Output:
function(x, y = 10) x + y
