I am a noob trying to troubleshooting an R script written by someone else. The script used to work, but now does not. It is related to apply()
, which is apply(X, MARGIN, FUN, ...)
. That says to me that format_date
is supposed to be a function. But the person who wrote this script did not define a function called format_date
, and I can't find this function in the libraries that are called in the script. Where do I find format_date
?
The reason for this line is that the index of this table is date. But we need a date field to export (and not just date as the index), so we are appending it on.
Here is the line throwing the error:
result$date = apply(rownames(result), 1, format_date) # add in date to dataframe
Here is the error message:
Warning: Ignoring unknown parameters: fill Saving 7 x 7 in image Error in apply(rownames(result), 1, format_date) : object 'format_date' not found