Skip to content

Commit

Permalink
Fix documentation
Browse files Browse the repository at this point in the history
- `lat` was still referred to in README and vignette as an argument. It was removed for `lonlat`

- Add code to show vignette in R session
  • Loading branch information
adamhsparks committed Nov 26, 2017
1 parent d76a7d5 commit 62d2d53
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 15 deletions.
18 changes: 13 additions & 5 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ using the following code:

```{r, eval=FALSE}
# install.packages("devtools", dep = TRUE)
devtools::install_github("adamhsparks/nasapower")
devtools::install_github("adamhsparks/nasapower", build_vingettes = TRUE)
```

## Introduction
Expand All @@ -47,7 +47,7 @@ variables can be specified by using the `vars` argument.

Both functions accept four arguments.

```r
```{r arguments, eval=FALSE}
get_cell(lonlat = NULL, vars = c("T2M", "T2MN", "T2MX", "RH2M"),
stdate = "1983-1-1", endate = Sys.Date())
```
Expand All @@ -56,8 +56,6 @@ get_cell(lonlat = NULL, vars = c("T2M", "T2MN", "T2MX", "RH2M"),

- `lonlat` for `get_region()` A length-4 numeric vector of the minimum longitude, maximum longitude, minimum latitude and maximum latitude.

- `lat` Latitude value to query (single value only)

- `vars` Weather variables to query for download. Valid `vars` include:

* toa_dwn - Average top-of-atmosphere insolation (MJ/m^2/day)
Expand Down Expand Up @@ -96,7 +94,17 @@ library(nasapower)
get_cell(lonlat = c(-179.5, -89.5))
```

More documentation is available in the vignette, <https://adamhsparks.github.io/nasapower/articles/nasapower.html>.
## Documentation

More documentation is available in the vignette in your R session.

```{r vignette, eval=FALSE}
vignette("nasapower")
```

Or available online.

<https://adamhsparks.github.io/nasapower/articles/nasapower.html>.

## Use of POWER Data

Expand Down
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ installed using the following code:

``` r
# install.packages("devtools", dep = TRUE)
devtools::install_github("adamhsparks/nasapower")
devtools::install_github("adamhsparks/nasapower", build_vingettes = TRUE)
```

## Introduction
Expand Down Expand Up @@ -58,8 +58,6 @@ get_cell(lonlat = NULL, vars = c("T2M", "T2MN", "T2MX", "RH2M"),
- `lonlat` for `get_region()` A length-4 numeric vector of the minimum
longitude, maximum longitude, minimum latitude and maximum latitude.

- `lat` Latitude value to query (single value only)

- `vars` Weather variables to query for download. Valid `vars`
include:

Expand Down Expand Up @@ -105,7 +103,16 @@ library(nasapower)
get_cell(lonlat = c(-179.5, -89.5))
```

More documentation is available in the vignette,
## Documentation

More documentation is available in the vignette in your R session.

``` r
vignette("nasapower")
```

Or available online.

<https://adamhsparks.github.io/nasapower/articles/nasapower.html>.

## Use of POWER Data
Expand Down
1 change: 0 additions & 1 deletion docs/articles/nasapower.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions vignettes/nasapower.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ get_cell(lonlat = NULL, vars = c("T2M", "T2MN", "T2MX", "RH2M"),
- `lonlat` A length-2 numeric vector giving the decimal degree longitude and
and latitude in that order for cell data to download

- `lat` Latitude value to query (single value only)

- `vars` Weather variables to query for download. Valid `vars` include:

* toa_dwn - Average top-of-atmosphere insolation (MJ/m^2/day)
Expand Down

3 comments on commit 62d2d53

@maelle
Copy link
Member

@maelle maelle commented on 62d2d53 Nov 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a typo @adamhsparks in "build_vingettes" 😉

@adamhsparks
Copy link
Member Author

@adamhsparks adamhsparks commented on 62d2d53 Nov 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah @maelle, see the very next commit: 89fbafc

😉

@maelle
Copy link
Member

@maelle maelle commented on 62d2d53 Nov 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh great 🙈

Please sign in to comment.