pacu: Precision Agriculture Computational Utilities - FAQ

Caio dos Santos & Fernando Miguez

2024-12-16

Specific vignettes

  1. Satellite data

  2. Weather data

  3. Yield monitor data

  4. Frequently asked questions

FAQ

  1. The pa_yield() function expects an sf object but my data is in a “.csv” format. How should I proceed?

    The data in a csv format can be read into R as a data frame and, subsequently, converted into an sf object. See the example below.

    x <- 40:45
    y <- -90:-95
    yield <- 100:105
    dat <- data.frame(x = x, 
                      y = y,
                      yield = yield)
    class(dat) ## data.frame
    ## [1] "data.frame"
    dat <- sf::st_as_sf(dat,
                 coords = c('x', 'y')) 
    class(dat) ## sf and data.frame
    ## [1] "sf"         "data.frame"
  2. How do I silence warnings and messages within the package?

    To silence warnings and messages, you can use the pacu_options() function.

    pacu_options(suppress.warnings = TRUE,
                 suppress.messages = TRUE)