download_data: Download data from 'API'

View source: R/utils.R

download_dataR Documentation

Download data from 'API'

Description

Download all types of 'GreenFeed' from 'API'

Usage

download_data(
  user,
  pass,
  d,
  type = 2,
  unit = NULL,
  start_date = NULL,
  end_date = NULL
)

Value

A dataframe

Examples


# Please replace "your_username" and "your_password" with your actual 'GreenFeed' credentials.
# By default, the function downloads the preliminary 'GreenFeed' data,
# if raw data is needed use options: "feed", "rfid", or "cmds"

download_data(
  user = "your_username",
  pass = "your_password",
  d = "visits",
  type = 2,
  unit = c(304, 305),
  start_date = "2024-01-01",
  end_date = Sys.Date()
)


greenfeedr documentation built on Sept. 9, 2025, 5:55 p.m.