Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Sep 5, 2022
1 parent 55fb6c9 commit f2309ff
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
14 changes: 11 additions & 3 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,24 @@ accurate as possible. Speed is welcome, but a secondary goal.
## Installation

With `drat`:
```R
``` r
drat::addRepo("JanMarvin")
install.packages("readsas")
```

With `devtools`:
```R
``` r
devtools::install_git("https://github.com/JanMarvin/readsas.git")
```

With `r-universe`:
``` r
options(repos = c(
janmarvin = 'https://janmarvin.r-universe.dev',
CRAN = 'https://cloud.r-project.org'))
install.packages('readsas')
```


## Basic usage
```{r}
Expand All @@ -56,7 +64,7 @@ This should be much faster, since unselected cells of the entire data frame are
fl <- system.file("extdata", "mtcars.sas7bdat", package="readsas")
dd <- read.sas(fl, select.cols = c("VAR1", "mpg", "hp"),
select.rows = c(2,5), rownames = TRUE)
select.rows = c(2:5), rownames = TRUE)
head(dd)
```
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ R package using Rcpp to parse a SAS file into a data.frame(). Currently

The package allows (experimental) reading of sas7bdat files that are

- (un)compressed
- (un)compressed

As with other releases of the `read` series, focus is again on being as
accurate as possible. Speed is welcome, but a secondary goal.
Expand All @@ -20,19 +20,20 @@ accurate as possible. Speed is welcome, but a secondary goal.

With `drat`:

```r
``` r
drat::addRepo("JanMarvin")
install.packages("readsas")
```

With `devtools`:

```r
``` r
devtools::install_git("https://github.com/JanMarvin/readsas.git")
```

With `r-universe`:
```r

``` r
options(repos = c(
janmarvin = 'https://janmarvin.r-universe.dev',
CRAN = 'https://cloud.r-project.org'))
Expand Down Expand Up @@ -68,7 +69,7 @@ time to read.
fl <- system.file("extdata", "mtcars.sas7bdat", package="readsas")

dd <- read.sas(fl, select.cols = c("VAR1", "mpg", "hp"),
select.rows = c(2,5), rownames = TRUE)
select.rows = c(2:5), rownames = TRUE)

head(dd)
#> mpg hp
Expand Down

0 comments on commit f2309ff

Please sign in to comment.