knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Using the NASS QuickStats tool, input:

For Land numbers

Program = Census Sector = Economics Group = Farms & Land & Assets Commodity = Ag Land

Data Items = Ag Land - Acres Ag Land - Number of Operations Ag Land, Cropland - Acres Ag Land, Cropland - Number of Operations Ag Land, Cropland, Harvested - Acres Ag Land, Cropland, Harvested - Number of Operations Ag Land, Cropland, Harvested, Irrigated - Acres Ag Land, Cropland, Harvested, Irrigated - Number of Operations Ag Land, Irrigated - Acres Ag Land, Irrigated - Number of Operations

Domain = Total

Geographic Level = County / State

Location: data-raw/downloaded_files/stateLandAreas data-raw/downloaded_files/countyLandAreas

For Crop numbers

Program = Census Sector = Crops Group = Field Crops Commodity = Select All Category = Area Harvested

Geographic Level = County / State State = Select All County = Download groups of counties sequentially. The Quick Stats tool won't work with all counties selected.

Year = 2017 Period Type = Annual Period = Year

Location: data-raw/downloaded_files/stateFieldCropAreas data-raw/downloaded_files/countyFieldCropAreas

For pasture irrigation

Program = Census Sector = Crops Group = Field Crops Commodity = Select All Category = Area

Geographic Level = State

Location: data-raw/downloaded_files/statePasture

For other crops

Program = Census Sector = Crops Group = Fruit & Tree Nuts, Horticulture, Vegetables Commodity = Select All Category = Area bearing & non-bearing, area bearing & nonbearing, Area grown, area harvested, area in production

Geographic level = county (then do state) state = south carolina

Location: data-raw/downloaded_files/countyOtherCropAreas data-raw/downloaded_files/stateOtherCropAreas

For irrigation stats

Program: CENSUS Group: IRRIGATION Geographic Level: STATE 46,256 records. nov 6, 2020

z = 1

Vignettes are long form documentation commonly included in packages. Because they are part of the distribution of the package, they need to be as compact as possible. The html_vignette output type provides a custom style sheet (and tweaks some options) to ensure that the resulting html is as small as possible. The html_vignette format:

Vignette Info

Note the various macros within the vignette section of the metadata block above. These are required in order to instruct R how to build the vignette. Note that you should change the title field and the \VignetteIndexEntry to match the title of your vignette.

Styles

The html_vignette template includes a basic CSS theme. To override this theme you can specify your own CSS in the document metadata as follows:

output: 
  rmarkdown::html_vignette:
    css: mystyles.css

Figures

The figure sizes have been customised so that you can easily put two images side-by-side.

plot(1:10)
plot(10:1)

You can enable figure captions by fig_caption: yes in YAML:

output:
  rmarkdown::html_vignette:
    fig_caption: yes

Then you can use the chunk option fig.cap = "Your figure caption." in knitr.

More Examples

You can write math expressions, e.g. $Y = X\beta + \epsilon$, footnotes^[A footnote here.], and tables, e.g. using knitr::kable().

knitr::kable(head(mtcars, 10))

Also a quote using >:

"He who gives up [code] safety for [code] speed deserves neither." (via)



capellett/acresCOA documentation built on Jan. 13, 2024, 11:38 p.m.