Defines decimal number fields with optional range constraints. Use for prices, percentages, ratings, or any continuous numeric data.
Examples
# Product price
schema_number("Price in USD", minimum = 0)
#> $type
#> [1] "number"
#>
#> $description
#> [1] "Price in USD"
#>
#> $minimum
#> [1] 0
#>
# Percentage score
schema_number("Confidence score", minimum = 0, maximum = 100)
#> $type
#> [1] "number"
#>
#> $description
#> [1] "Confidence score"
#>
#> $minimum
#> [1] 0
#>
#> $maximum
#> [1] 100
#>