I store data in elasticsearch using the docks_bulk method of elastic package in R.
docs_bulk(conn, dataframe, index = "index_name")