You can use the names() function to set the header of a DataFrame.
Here is an example:
names(your_dataframe) <- c("col1", "col2", "col3")
The above example adds a header to the DataFrame with 3 columns: "col1", "col2", "col3".