Skip to content

Commit

Permalink
Some corrections to README and vignette.
Browse files Browse the repository at this point in the history
  • Loading branch information
rbertolusso committed Aug 29, 2016
1 parent ee187df commit 6f248a1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 32 deletions.
14 changes: 5 additions & 9 deletions INSTALL
@@ -1,13 +1,9 @@
XBRL has been developed on a Gentoo 64 bits Linux platform. 32 bits
intubate has been developed on a Gentoo 64 bits Linux platform. 32 bits
systems should not make any difference. It should work in other *nix
variants, including OS X, with little or no modification of location
of include files and libraries.
variants, including OS X.

Binary packages for Windows, both 32 and 64 bits, have been
successfully built in winbuilder (http://win-builder.r-project.org),
as libxml2 is part of the Rtools standard library set
(http://www.stats.ox.ac.uk/pub/Rtools/libs.html)
successfully built in winbuilder (http://win-builder.r-project.org).

If you want to install XBRL in Windows from source, you will need to
have a recent version of Rtools installed. You will also need to
declare LIB_XML to point where libxml2 is installed.
If you want to install intubate in Windows from source, you may need to
have a recent version of Rtools installed.
19 changes: 9 additions & 10 deletions README.md
Expand Up @@ -127,7 +127,7 @@ USJudgeRatings %>%
```

### Calling non-pipe-aware functions directly with `ntbt`
Of course, as already stated, you **do not have to create an interface** if you do not
As already stated, you **do not have to create an interface** if you do not
want to. You can **call the non-pipe-aware function directly** with `ntbt`,
in the following way:

Expand All @@ -143,7 +143,7 @@ a pipeline (because `data` is not in first place in the definition of the functi

### Example showing different techniques

The link below is to Dr. Sheather's website where code was extracted.
The link below is to Dr. Sheather's website where the original code was extracted.
In the link there is also information about the book.
This code could be used to produce the plots in Figure 3.1 on page 46.
Different strategies are illustrated.
Expand Down Expand Up @@ -193,7 +193,7 @@ To create an interface, it suffices the following line of code before its use:
ntbt_lsfit <- intubate # NOTE: we are *not* including parentheses.
```

That's it, you have created you interface. Just remember that:
That's it, you have created the interface to `lsfit`. Just remember that:

1. `intubate` interfaces **must** start with `ntbt_` followed by the
name of the function to interface (`lsfit` in this case).
Expand Down Expand Up @@ -263,7 +263,7 @@ The `intuBorder` contains 5 zones (`intuZones`?, maybe too much...):
**result** of the interfaced function

For example, instead of running the following sequence
of function calls (only plot shown):
of function calls:

```r
head(LifeCycleSavings)
Expand Down Expand Up @@ -345,7 +345,7 @@ The `intubOrder` will need the following info:
* `zone 1`, in each case, indicates which is the data.frame (or any other object)
that we want to use as input in this particular function
* `zone 3` needs to include `f` to *forward* the input (if you want the next
function to receive the whole collection, and not the result if this step)
function to receive the whole collection, and not the result of this step)
* `zone 4` (optional) may contain a `print` (or `summary`) if you want
something to be displayed

Expand Down Expand Up @@ -379,7 +379,7 @@ be populated with results that you want to use later.
You can access the `intuEnv` as follows:

```r
intuEnv() ## intuEnv() returns invisible, so nothing is output
intuEnv() ## intuEnv() returns invisibly, so nothing is output
```

You can verify that, initially, it is empty:
Expand All @@ -390,9 +390,8 @@ ls(intuEnv())

How can `intuEnv` be used?

Suppose that we want, instead of displaying the results of interfaced functions,
save the objects returned by them. One strategy (the other is using `intuBags`)
is to save the results to `intuEnv`.
Suppose that we want, instead of, or in addition to, displaying the results of interfaced functions, save the objects returned by them. One strategy
is to save the results to `intuEnv` (the other is using `intuBags`).

#### How to save to `intuEnv`?

Expand Down Expand Up @@ -507,7 +506,7 @@ ls()

They were.

Now the results are at your disposal to use as any other variable (result not
Now the results are at your disposal to use as any other variable (output not
shown):

```r
Expand Down
25 changes: 12 additions & 13 deletions vignettes/intubate.Rmd
Expand Up @@ -4,7 +4,7 @@ author: "Roberto Bertolusso"
date: "August 27, 2016"
output: rmarkdown::html_document
vignette: >
%\VignetteIndexEntry{Vignette Title}
%\VignetteIndexEntry{intubate <||> 1.0.0}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---
Expand Down Expand Up @@ -93,7 +93,7 @@ As an example of creating an interface "on demand", suppose the interface to
`cor.test` was lacking in the current version of `intubate` and *suppose*
(at least for a moment) that you want to
create yours because you are searching for a pipeline-aware alternative to
any of the following styles of coding (results not shown):
any of the following styles of coding (output not shown):

```{r, results = 'hide'}
data(USJudgeRatings)
Expand Down Expand Up @@ -140,7 +140,7 @@ USJudgeRatings %>%
```

### Calling non-pipe-aware functions directly with `ntbt`
Of course, as already stated, you **do not have to create an interface** if you do not
As already stated, you **do not have to create an interface** if you do not
want to. You can **call the non-pipe-aware function directly** with `ntbt`,
in the following way:

Expand All @@ -156,7 +156,7 @@ a pipeline (because `data` is not in first place in the definition of the functi

### Example showing different techniques

The link below is to Dr. Sheather's website where code was extracted.
The link below is to Dr. Sheather's website where the original code was extracted.
In the link there is also information about the book.
This code could be used to produce the plots in Figure 3.1 on page 46.
Different strategies are illustrated.
Expand Down Expand Up @@ -204,7 +204,7 @@ To create an interface, it suffices the following line of code before its use:
ntbt_lsfit <- intubate # NOTE: we are *not* including parentheses.
```

That's it, you have created you interface. Just remember that:
That's it, you have created the interface to `lsfit`. Just remember that:

1. `intubate` interfaces **must** start with `ntbt_` followed by the
name of the function to interface (`lsfit` in this case).
Expand Down Expand Up @@ -305,7 +305,7 @@ LifeCycleSavings %>%
call requires extra parameters.

* `intubOrders` may prove to be of interest to non-pipeline oriented people too
(results not shown):
(output not shown):

```{r, results = 'hide'}
ntbt_lm(LifeCycleSavings, sr ~ pop15 + pop75 + dpi + ddpi,
Expand All @@ -323,7 +323,7 @@ consumed as a whole by the following function.
`intubOrders` allow you to work with a collection of objects of any kind in *one* pipeline, selecting at each step which input to use.

As an example suppose you want to perform the following statistical procedures in
one pipeline (results not shown).
one pipeline (output not shown).

```{r, results = 'hide'}
CO2 %>%
Expand Down Expand Up @@ -357,7 +357,7 @@ The `intubOrder` will need the following info:
* `zone 1`, in each case, indicates which is the data.frame (or any other object)
that we want to use as input in this particular function
* `zone 3` needs to include `f` to *forward* the input (if you want the next
function to receive the whole collection, and not the result if this step)
function to receive the whole collection, and not the result of this step)
* `zone 4` (optional) may contain a `print` (or `summary`) if you want
something to be displayed

Expand Down Expand Up @@ -391,7 +391,7 @@ be populated with results that you want to use later.
You can access the `intuEnv` as follows:

```{r}
intuEnv() ## intuEnv() returns invisible, so nothing is output
intuEnv() ## intuEnv() returns invisibly, so nothing is output
```

You can verify that, initially, it is empty:
Expand All @@ -402,9 +402,8 @@ ls(intuEnv())

How can `intuEnv` be used?

Suppose that we want, instead of displaying the results of interfaced functions,
save the objects returned by them. One strategy (the other is using `intuBags`)
is to save the results to `intuEnv`.
Suppose that we want, instead of, or in addition to, displaying the results of interfaced functions, save the objects returned by them.
One strategy is to save the results to `intuEnv` (the other is using `intuBags`).

#### How to save to `intuEnv`?

Expand Down Expand Up @@ -725,7 +724,7 @@ iBag %<>%
names(iBag)
```

Note: the results were copied from previously run code to avoid adding dependences.
Note: the output was copied from previously run code to avoid adding dependencies.

```
##
Expand Down

0 comments on commit 6f248a1

Please sign in to comment.