library(ellmer)
# define the metadata
tool_rnorm = tool(
stats::rnorm,
name = "rnorm",
description = "Draw numbers from a random normal distribution",
arguments = list(
n = type_integer("The number of observations. Must be a positive integer."),
mean = type_number("The mean value of the distribution."),
sd = type_number("The standard deviation of the distribution. Must be a non-negative number.")
)
)
tool_rnorm# <ellmer::ToolDef> rnorm(n, mean, sd)
# @name: rnorm
# @description: Draw numbers from a random normal distribution
# @convert: TRUE
#
function (n, mean = 0, sd = 1)
.Call(C_rnorm, n, mean, sd)
<bytecode: 0x55c04d2f1cd0>
<environment: namespace:stats>