[R] read_csv() error I cannot find [FOUND AND FIXED]

Rich Shepard r@hep@rd @end|ng |rom @pp|-eco@y@@com
Wed Nov 24 19:42:51 CET 2021


On Wed, 24 Nov 2021, Bill Dunlap wrote:

> Did the 3 warnings come from three separate calls to read_csv?  If so, can
> you identify which files caused the warnings?  E.g., change the likes of
>   lapply(files, function(file) read_csv(file, ...)) to
>   options(warn=1) # report warnings immediately
>   lapply(files, function(file){ cat(file, "\n"); read_csv(file, ...)})
> Then look at the first lines of those files and see if they have the
> expected column names.

Bill,

No. Yesterday while I tried to find the error source there was only the one
warning. Today there were three.

I moved all but one of the data files to a temporary storage file, sourced
the script, added another data file. No errors are displayed. I thought of
this yesterday but it was late and I put it off and forgot to do this today
until I read your message.

There was one data file that had the parameter name in the header rather
than the string, 'param.' That must have been the source of the error.

Thanks for reminding me to back up and do a step-wise import.

Regards,

Rich



More information about the R-help mailing list