bump R version dependency

This commit is contained in:
Tom Elliott 2025-02-07 13:31:30 +13:00
parent 96097fa692
commit bd605a4f28
5 changed files with 18 additions and 4 deletions

View File

@ -11,6 +11,8 @@ Encoding: UTF-8
Roxygen: list(markdown = TRUE) Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1 RoxygenNote: 7.3.1
Config/testthat/edition: 3 Config/testthat/edition: 3
Depends:
R (>= 4.1.0)
Imports: Imports:
rlang, rlang,
Rserve Rserve

View File

@ -152,6 +152,13 @@ n_type_fun <- function(n, type) {
#' @return A ts object that accepts logical scalars or vectors of length `n`. #' @return A ts object that accepts logical scalars or vectors of length `n`.
#' @export #' @export
#' @md #' @md
#' @examples
#' x <- ts_logical(1)
#' x$check(TRUE)
#'
#' \dontrun{
#' x$check(5)
#' }
ts_logical <- function(n = -1L) { ts_logical <- function(n = -1L) {
ts_object( ts_object(
n_type(n, "z.boolean()"), n_type(n, "z.boolean()"),

View File

@ -16,3 +16,11 @@ A ts object that accepts logical scalars or vectors of length \code{n}.
Booleans are represented in Zod schema as either a boolean (\code{z.boolean()}), Booleans are represented in Zod schema as either a boolean (\code{z.boolean()}),
or a typed Uint8Array (\code{z.instanceof(Uint8Array)}). or a typed Uint8Array (\code{z.instanceof(Uint8Array)}).
} }
\examples{
x <- ts_logical(1)
x$check(TRUE)
\dontrun{
x$check(5)
}
}

View File

@ -1,6 +1,3 @@
# # optional, check arguments - useful for debugging/development
# check_args(match.call(), formals())
test_that("anonomous function definitions", { test_that("anonomous function definitions", {
add <- ts_function( add <- ts_function(
function(a = ts_numeric(1), b = ts_numeric(1)) a + b, function(a = ts_numeric(1), b = ts_numeric(1)) a + b,

View File

@ -38,7 +38,7 @@ That's it! We'll use `ts_compile()` later to create the server code and Typescri
## Create the React app ## Create the React app
I'm using [Vite](https://vitejs.dev/) to create the app, but you could use any framework. Whatever you use, you'll need to be able to bundle the code (including libraries such as [zod](https://zod.dev)). I'm using [Vite](https://vite.dev/) to create the app, but you could use any framework. Whatever you use, you'll need to be able to bundle the code (including libraries such as [zod](https://zod.dev)).
```bash ```bash
pnpm create vite faithful-demo --template vanilla-ts pnpm create vite faithful-demo --template vanilla-ts