knitr::opts_chunk$set(echo = TRUE) library(pacu)
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. ```r x <- 40:45 y <- -90:-95 yield <- 100:105 dat <- data.frame(x = x, y = y, yield = yield) class(dat) ## data.frame
dat <- sf::st_as_sf(dat, coords = c('x', 'y')) class(dat) ## sf and data.frame
```
How do I silence warnings and messages within the package?
To silence warnings and messages, you can use the pacu_options() function.
r
pacu_options(suppress.warnings = TRUE,
suppress.messages = TRUE)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.