Skip to content

Commit

Permalink
typos small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchobben committed Oct 25, 2022
1 parent b477301 commit 9123210
Show file tree
Hide file tree
Showing 6 changed files with 233 additions and 65 deletions.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
^renv$
^renv\.lock$
^rirods2\.Rproj$
^rirods\.Rproj$
^\.Rproj\.user$
^README\.Rmd$
^data-raw$
Expand All @@ -10,3 +10,4 @@
^docs$
^pkgdown$
^\.github$
^\.covrignore$
18 changes: 8 additions & 10 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ rirods:::iadmin(action = "add", target = "user", arg2 = "bobby", arg3 = "rodsuse
rirods:::iadmin(action = "modify", target = "user", arg2 = "bobby", arg3 = "password", arg4 = "passWORD")
```

Then to connect a project from R with the iRODS server you have to provide the host name of the server, like so:
Provide the host name of the server to connect an R project with an iRODS server, like so:

```{r start, eval=FALSE}
library(rirods)
Expand All @@ -82,7 +82,7 @@ iauth()
iauth("bobby", "passWORD")
```

Suppose Bobby would like to upload an R object from his current R session to an iRODS collection. For this, use the iput command:
Suppose Bobby would like to upload an R object from his current R session to an iRODS collection. For this, use the `iput()` command:

```{r put}
# some data
Expand All @@ -93,7 +93,11 @@ ipwd()
# store
iput(foo)
```

To truly appreciate the strength of iRODS, we can add some metadata that describes the data object "foo".

```{r meta}
# add some metadata
imeta(
"foo",
Expand All @@ -106,8 +110,7 @@ imeta(
ils(metadata = TRUE)
```

If Bobby wanted to copy the foo R object from an iRODS collection to his local directory, he would use
iget:
If Bobby wanted to copy the foo R object from an iRODS collection to his local directory, he would use `iget()`:

```{r get}
# retrieve in native R format
Expand Down Expand Up @@ -141,7 +144,7 @@ iget("foo.csv")
read_csv("foo.csv")
```

Objects can also be discovered by using General Queries and `iquery()`:
By adding metadata you and others can more easily discover data in future projects. Objects can be searched with General Queries and `iquery()`:

```{r query, options}
# look for objects in the home directory with a wildcard `%`
Expand Down Expand Up @@ -186,8 +189,3 @@ ils()
file.remove("rirods.irods")
```

## Stop your local iRODS server

```{bash, eval=FALSE}
docker-compose down
```
53 changes: 30 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ cd ../irods_demo
docker-compose up
```

Then to connect a project from R with the iRODS server you have to
provide the host name of the server, like so:
Provide the host name of the server to connect an R project with an
iRODS server, like so:

``` r
library(rirods)
Expand All @@ -58,7 +58,7 @@ iauth()
```

Suppose Bobby would like to upload an R object from his current R
session to an iRODS collection. For this, use the iput command:
session to an iRODS collection. For this, use the `iput()` command:

``` r
# some data
Expand All @@ -70,7 +70,12 @@ ipwd()

# store
iput(foo)
```

To truly appreciate the strength of iRODS, we can add some metadata that
describes the data object “foo”.

``` r
# add some metadata
imeta(
"foo",
Expand All @@ -81,12 +86,13 @@ imeta(

# check if file is stored with associated metadata
ils(metadata = TRUE)
#> logical_path metadata type
#> 1 /tempZone/home/bobby/foo foo, bar, baz data_object
#> logical_path metadata type
#> 1 /tempZone/home/bobby/foo foo, baz, bar data_object
#> 2 /tempZone/home/bobby/test NULL data_object
```

If Bobby wanted to copy the foo R object from an iRODS collection to his
local directory, he would use iget:
local directory, he would use `iget()`:

``` r
# retrieve in native R format
Expand Down Expand Up @@ -114,6 +120,7 @@ ils()
#> logical_path type
#> 1 /tempZone/home/bobby/foo data_object
#> 2 /tempZone/home/bobby/foo.csv data_object
#> 3 /tempZone/home/bobby/test data_object
```

Later on somebody else might want to download this file again and store
Expand All @@ -139,28 +146,33 @@ read_csv("foo.csv")
#> 3 9 z
```

Objects can also be discovered by using General Queries and `iquery()`:
By adding metadata you and others can more easily discover data in
future projects. Objects can be searched with General Queries and
`iquery()`:

``` r
# look for objects in the home directory with a wildcard `%`
iquery("SELECT COLL_NAME, DATA_NAME WHERE COLL_NAME LIKE '/tempZone/home/%'")
#> collection data_object
#> 1 /tempZone/home/bobby foo
#> 2 /tempZone/home/bobby foo.csv
#> 3 /tempZone/home/bobby test
```

``` r
# or where data objects named "foo" can be found
iquery("SELECT COLL_NAME, DATA_NAME WHERE DATA_NAME LIKE 'foo%'")
#> collection data_object
#> 1 /tempZone/home/bobby foo
#> 2 /tempZone/home/bobby foo.csv
#> 3 /tempZone/trash/home/bobby foo
#> 4 /tempZone/trash/home/bobby foo.1682976494
#> 5 /tempZone/trash/home/bobby foo.35790442
#> 6 /tempZone/trash/home/bobby foo.csv
#> 7 /tempZone/trash/home/bobby foo.csv.1247785700
#> 8 /tempZone/trash/home/bobby foo.csv.66409892
#> collection data_object
#> 1 /tempZone/home/bobby foo
#> 2 /tempZone/home/bobby foo.csv
#> 3 /tempZone/trash/home/bobby foo
#> 4 /tempZone/trash/home/bobby foo.1576729182
#> 5 /tempZone/trash/home/bobby foo.2405108537
#> 6 /tempZone/trash/home/bobby foo.2435297455
#> 7 /tempZone/trash/home/bobby foo.csv
#> 8 /tempZone/trash/home/bobby foo.csv.1036575935
#> 9 /tempZone/trash/home/bobby foo.csv.2236717404
#> 10 /tempZone/trash/home/bobby foo.csv.4082161960
```

Finally, we can clean up Bobby’s home directory:
Expand All @@ -172,13 +184,8 @@ irm("foo.csv", trash = FALSE)

# check if object is removed
ils()
#> This collection does not contain any objects or collections.
#> logical_path type
#> 1 /tempZone/home/bobby/test data_object
```

<!-- The user Bobby can also be removed again. -->

## Stop your local iRODS server

``` bash
docker-compose down
```
4 changes: 1 addition & 3 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CMD
Codecov
GeneralQuery
IRODS
Expand All @@ -11,11 +12,8 @@ http
https
iCAT
iRODS
iget
iput
irods
rebalance
rirods
specificQuery
tibble
unusedAVUs
Loading

0 comments on commit 9123210

Please sign in to comment.