bump R version dependency
This commit is contained in:
parent
96097fa692
commit
bd605a4f28
@ -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
|
||||||
|
|||||||
@ -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()"),
|
||||||
|
|||||||
@ -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)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -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,
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user