Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPKG-8: interface adjustments after first cran release #25

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: interface
Type: Package
Title: Runtime Type System
Version: 0.1.2
Version: 0.1.3
URL: https://github.com/dereckmezquita/interface
Authors@R:
person(given = "Dereck",
Expand Down
4 changes: 3 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# interface [v0.1.0](https://github.com/dereckmezquita/interface/milestone/1) (in development)
# interface [v0.2.0](https://github.com/dereckmezquita/interface/milestone/2) (in development)

# interface [v0.1.0](https://github.com/dereckmezquita/interface/milestone/1) (10 September 2024)

## BREAKING CHANGES

Expand Down
18 changes: 12 additions & 6 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@ The `interface` package provides a system for defining and implementing interfac

## Installation

To install the package, use the following command:
Install the package from CRAN:

```{r eval = FALSE}
install.packages("interface")
```

Or install the latest development version from GitHub:

```{r eval = FALSE}
# Install the package from the source
Expand Down Expand Up @@ -203,9 +209,9 @@ print(typed_fun2(1, 2)) # [1] 3
print(typed_fun2("a", 2)) # [1] "a 2"
```

### Typed Data Frames and Data Tables
### Typed `data.frame`s and `data.table`s

Create data frames with column type constraints and row validation:
Create `data.frame`s with column type constraints and row validation:

```{r}
PersonFrame <- type.frame(
Expand All @@ -232,7 +238,7 @@ print(persons)
try(persons$id <- letters[1:3])
```

Additional options for data frame validation:
Additional options for `data.frame` validation:

```{r}
PersonFrame <- type.frame(
Expand Down Expand Up @@ -328,7 +334,7 @@ try(car1$make$value <- "Honda")

## Conclusion

The `interface` package provides powerful tools for ensuring type safety and validation in R. By defining interfaces, typed functions, and typed data frames, you can create robust and reliable data structures and functions with strict type constraints. For more details, refer to the package documentation.
The `interface` package provides powerful tools for ensuring type safety and validation in R. By defining interfaces, typed functions, and typed `data.frame`s, you can create robust and reliable data structures and functions with strict type constraints. For more details, refer to the package documentation.

## License

Expand All @@ -338,4 +344,4 @@ This package is licensed under the MIT License.

If you use this package in your research or work, please cite it as:

Mezquita, D. (2024). interface: A Runtime Type System. R package version 0.1.0. https://github.com/dereckmezquita/interface
Mezquita, D. (2024). interface: A Runtime Type System. R package version 0.1.2. https://github.com/dereckmezquita/interface
16 changes: 11 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,13 @@ benefits of statically-typed languages to R with zero dependencies.

## Installation

To install the package, use the following command:
Install the package from CRAN:

``` r
install.packages("interface")
```

Or install the latest development version from GitHub:

``` r
# Install the package from the source
Expand Down Expand Up @@ -228,9 +234,9 @@ print(typed_fun2("a", 2)) # [1] "a 2"
#> [1] "a 2"
```

### Typed Data Frames and Data Tables
### Typed `data.frame`s and `data.table`s

Create data frames with column type constraints and row validation:
Create `data.frame`s with column type constraints and row validation:

``` r
PersonFrame <- type.frame(
Expand Down Expand Up @@ -278,7 +284,7 @@ try(persons$id <- letters[1:3])
#> Error : Property 'id' must be of type integer
```

Additional options for data frame validation:
Additional options for `data.frame` validation:

``` r
PersonFrame <- type.frame(
Expand Down Expand Up @@ -432,7 +438,7 @@ try(car1$make$value <- "Honda")

The `interface` package provides powerful tools for ensuring type safety
and validation in R. By defining interfaces, typed functions, and typed
data frames, you can create robust and reliable data structures and
`data.frame`s, you can create robust and reliable data structures and
functions with strict type constraints. For more details, refer to the
package documentation.

Expand Down
Loading